#996 closed defect (fixed)
non-PNG images in DWF drawing sources rendered upside down with AGG
Reported by: | waltweltonlair | Owned by: | waltweltonlair |
---|---|---|---|
Priority: | high | Milestone: | 2.1 |
Component: | Rendering Service | Version: | 2.1.0 |
Severity: | major | Keywords: | |
Cc: | External ID: | 1042721.01 |
Description
DWF image symbols from symbol libraries created with Studio are being rendered upside down. The W2Ds in the library contain non-PNG images (WT_Image opcodes). W2Ds with PNG images (WT_PNG_Group4_Image) render correctly.
Change History (7)
comment:1 by , 16 years ago
Severity: | trivial → major |
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Fixed in the trunk stream with submission https://trac.osgeo.org/mapguide/changeset/3884.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in the 2.1 branch stream with submission https://trac.osgeo.org/mapguide/changeset/3885.
comment:5 by , 16 years ago
Walt, there's a new branch under /branches/2.1/MgDev I'm not sure if it matters if the DWF fixes get in there...
comment:6 by , 16 years ago
Ok, also submitted fix to the 2.1 OS branch stream: https://trac.osgeo.org/mapguide/changeset/3886.
We had a similar problem a while back - see ticket #941. For that ticket the original problem was that W2Ds containing PNG images were drawing upside down. The correct fix was made to agr_process_pngGroup4Image (in AGGW2DRewriter.cpp), but the same code change was also made to agr_process_image. The latter method should not have been changed.
The agr_process_pngGroup4Image method calls AGGImageIO::DecodePNG which returns a buffer that already contains a pre-inverted image. Therefore the subsequent call to DrawScreenRaster needs to be done with a positive height. This was corrected for ticket #941.
But the image buffer used by agr_process_image method does not contain a pre-inverted image, and therefore the associated call to DrawScreenRaster needs to be done with a negative height.