[GRASS-dev] Re: [GRASS GIS] #937: cairo driver: d.legend colors all broken

GRASS GIS trac at osgeo.org
Mon Feb 15 07:25:00 EST 2010


#937: cairo driver: d.legend colors all broken
----------------------+-----------------------------------------------------
  Reporter:  hamish   |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  major    |   Milestone:  7.0.0                    
 Component:  Display  |     Version:  svn-trunk                
Resolution:           |    Keywords:  cairo, d.legend          
  Platform:  Linux    |         Cpu:  x86-64                   
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [comment:2 hamish]:

 > > I can't reproduce this.
 >
 > trunk/

 Works for me.

 But looking at the image, I'm guessing that it's an alignment problem. The
 header is 54 bytes, which isn't a multiple of 4. The documentation for
 cairo_image_surface_create_for_data() says:

 > This pointer must be suitably aligned for any kind of variable, (for
 example, a pointer returned by malloc).

 It wouldn't surprise me if an unaligned frame buffer behaves incorrectly
 on x86-64.

 Try r41029; this pads the header to 64 bytes in everything which
 reads/writes these files (PNG driver, cairo driver, ximgview, wximgview,
 wxpyimgview). The offset to the data is stored in the header (to allow for
 variable-length fields and the addition of new fields), so the files
 should still be legal (not that most software can handle them anyhow).

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/937#comment:4>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list