This bug manifests when printing. Attached are afps generated at rev 829021 (ok) and rev 829061 (broken). The jpgs show scans of the printed output and an error message printed for rev 829061. The resources used to generate the documents are also attached. Note that changes were made to the Xml Graphics Commons library at the same time.
Created attachment 24938 [details] example of bug
Hi, there is only a small diff between 829021 and 829061 and the resuling print out depends on some printer characteristic. |829021 |829061 -------------------+---------+-------------------------------------------+ IBM Infoprint IP70 | OK | 0420-486 either not valid or not supported| OCE printer | OK | OK | | | | IBM workbench | OK | OK | ver 2.05.04.01 BTB Afp Browser | no image| OK | ver 1.30 ISIS plugin | no image| no image | ISIS Papyrus AFP Viewer V.7.01/w3 Both writes out a IOCA function set 11 image and 829061 write out an additional 0x9B IDE Structure parameter. 0x9B: IDE Structure parameter [6] Flags: 0x00 (- Additive) (- Gray Coding: off) Format: 0x01 (RGB) Reserved: 00 00 00 Size1: 0x08 (8) Accouding to ioca_S550-1142-00.pdf the only valid format bytes for IDESZ=8 is X'02' YCrCb (see Note 2) X'12' YCbCr (see Note 2) Note 2: Notes on parameters used when IDESZ=4 or IDESZ=8: Grayscale images only. Grayscale IDEs are composed of the Y component only of the YCrCb or YCbCr color model. -- dump of revison 829061: 0xD3A8CE: BR Begin Resource [20] (Offset ???) "RES00002" Reserved: 00 00 T21: Resource Object Type (R) [8] ObjType: 0x06 (Image (IOCA) object (retired)) ConData: 00 00 00 00 00 00 00 { 0xD3A8FB: BIM Begin Image Object [8] (Offset ???) "IMG00002" { 0xD3A8C7: BOG Begin Object Environment Group [8] (Offset ???) "OEG00002" { 0xD3A66B: OBD Object Area Descriptor [20] (Offset ???) T43: Descriptor Position [1] DesPosID: 0x01 (1) T4B: Object Area Measurement Units [6] XoaBase: 0x00 (10 inches) YoaBase: 0x00 (10 inches) XoaUnits: 0x0960 (2400) YoaUnits: 0x0960 (2400) T4C: Object Area Size [7] SizeType: 0x02 (2) XoaSize: 0x0001E0 (480) YoaSize: 0x0001E0 (480) 0xD3AC6B: OBP Object Area Position [24] (Offset ???) OAPosID: 0x01 (1) RGLength: 0x17 (23) XoaOSet: 0x000000 (0) YoaOSet: 0x000000 (0) XoaOrent: 0x0000 (0 degree) YoaOrent: 0x2D00 (90 degree) Reserved: 00 XocaOSet: 0x000000 (0) YocaOSet: 0x000000 (0) XocaOrent: 0x0000 (0 degree) YocaOrent: 0x2D00 (90 degree) RefCSys: 0x00 (origin defined by IPS) 0xD3ABFB: MIO Map IO Image Object [5] (Offset ???) 000 RGLength: 0x0005 (5) T04: Mapping Option [1] MapValue: 0x60 (Scale to Fill) 0xD3A6FB: IDD Image Data Descriptor IO [13] (Offset ???) UnitBase: 0x00 (10 inches) XResol: 0x02D0 (720) YResol: 0x02D0 (720) XSize: 0x0258 (600) YSize: 0x0258 (600) 0xF7: IOCA Function Set Identification [2] Category: 0x01 (Function Set identifier) FcnSet: 0x0B (11) } 0xD3A9C7: EOG End Object Environment Group [8] (Offset ???) "OEG00002" 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [8192] (Offset ???) 0xD3EEFB: IPD Image Picture Data IO [7803] (Offset ???) IPD Image Picture Data IO [360059] (44 combined records) { 0x70: Begin Segment [0] 0x91: Begin Image Content [1] ObjType: 0xFF (IOCA Image Object) 0x94: Image Size parameter [9] UnitBase: 0x00 (10 inches) HResol: 0x02D0 (720) VResol: 0x02D0 (720) HSize: 0x0258 (600) VSize: 0x0258 (600) 0x95: Image Encoding parameter [2] CompID: 0x03 (No compression) RecID: 0x01 (RIDIC (Recording Image Data Inline Coding)) 0x96: IDE Size parameter [1] IDESize: 0x08 (8) 0x9B: IDE Structure parameter [6] Flags: 0x00 (- Additive) (- Gray Coding: off) Format: 0x01 (RGB) Reserved: 00 00 00 Size1: 0x08 (8) 0x92: Image Data [65535] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 0x92: Image Data [65535] FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... 0x92: Image Data [65535] 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 8B AC FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... 0x92: Image Data [65535] FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... 0x92: Image Data [65535] FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 D0 00 00 D0 D0 D0 ... 0x92: Image Data [32325] FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 77 77 77 77 77 77 77 77 77 77 ... 0x93: End Image Content [0] 0x71: End Segment [0] } } 0xD3A9FB: EIM End Image Object [8] (Offset ???) "IMG00002" } 0xD3A9CE: ER End Resource [8] (Offset ???) "RES00002"
sorry the table was messed up: printer and viewer test |829021 |829061 -------------------+---------+-------------------------------------------+ IBM Infoprint IP70 | OK | 0420-486 either not valid or not supported| OCE printer | OK | OK | | | | IBM workbench | OK | OK | BTB Afp Browser | no image| OK | ISIS plugin | no image| no image | IBM workbench ver 2.05.04.01 BTB Afp Browser v 1.30 ISIS Papyrus AFP Viewer V.7.01/w3
Function Set 20 allows using FORMAT X'01' RGB, but my printtest with a IBM Infoprint IP70 results in the same error: 0420-486: ERROR The actual destiantion reported an OCA self-defining field code taht is either not valid or not supported. Unfortunately i do not have a list of all supported 'Function Sets' of my IP70 or any other printer. Maybe someone of the mailing list afp-l@topica.com have such information.
Thanks for your input, Harald. Chaging the Format field of the IDE Structure parameter to YCrCb, produced a desirable printed output. The IDEStructureParameter class defaults this property to RGB, and it is not set by the process for b+w color images.
Created attachment 24951 [details] Quick fix
Verified and commited. Thanks, Peter. http://svn.apache.org/viewvc?rev=908394&view=rev BTW, while testing I found that the JPG in the demo ZIP, when encoded in RGB mode, comes out wrong (PNG is fine). I don't have time to look more closely at this right now.
The commited fix breaks other functionality
Created attachment 24970 [details] A fix The previous commited fix broke the printing of color images.
Could a commiter please review the proposed amendments to commit 908394 in attachment 24970 [details]. Commit 24970 introduced a bug.
Created attachment 25308 [details] A revised fix
Created attachment 26443 [details] patch against trunk@1051874 Differences fro mprevious patch: No IDEStructureParameter for a YCBCR color model is required for 1 bit/pixel b+w images The Subtactive IDEStructureParameter should only be set on subtractive images with bit/pixel > 1
Final patch committed in http://svn.apache.org/viewvc?rev=1175808&view=rev