STR #1703

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 ]

STR #1703

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:4 - High, e.g. key functionality not working
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:alpha compositor fix
Version:1.1-current
Created By:sanel.z
Assigned To:matt
Fix Version:1.1-current (SVN: v5888)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text top right image
 
#1 sanel.z
09:24 Jun 05, 2007
This is fix for 1.1.8 (current svn version) affecting gray images with alpha.

In given versions, alpha compositor filled with grayscale image data will
crash whole app yielding '*** glibc detected *** corrupted double-linked list: xxx'
message.

This is due loop who will overwrite memory node to the next allocated segment,
so []delete will fail. And fix is:

// void alpha_blend(...) Fl_Image.cxx

  if (img->d() == 2) {
    // Composite grayscale + alpha over RGB...
    // Composite RGBA over RGB...
    for (int y = H; y > 0; y--, srcptr+=srcskip)
      //for (int x = W; x > 0; x--, dstptr+=3) {   <-- old
      for (int x = W; x > 0; x--) {                <-- new

        srcg = *srcptr++;
        srca = *srcptr++;

  ...

Before fix you can try it too; with gimp convert some png icon (for example
from crystalsvg theme) to grayscale, retaining alpha channel. Openning it
(eg. with FileChooser (Preview on)) will show crash.

Also, gray images will be drawn correctly after above small fix.
 
 
#2 matt
10:24 Jun 07, 2007
Fixed in Subversion repository.

Thanks for the patch!
 
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.