STR #1412

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 #1412

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:Fl_RGB_Image::copy not working for ld()!=w()
Created By:dvdkhlng
Assigned To:matt
Fix Version:1.1-current (SVN: v5411)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files

Trouble Report Comments:

Name/Time/Date Text top right image
#1 dvdkhlng
14:01 Sep 03, 2006
Fl_RGB_Image::copy(int W, int H) has a severe error:
when creating an equally-sized copy, the value of ld() is ignored (Fl_RGB_Image.cxx:158):

      new_array = new uchar[w() * h() * d()];
      memcpy(new_array, array, w() * h() * d());

resulting in an uncomplete copy of the data (if ld() > w())  The best solution would be to check for w()!=ld() and doing a line-wise copy in that case.  Copying the complete image with ld()*h()*d() is a bad idea since sometimes ld() > w() is used to reference only parts of a huge image and we don't want to copy that much data.  In my case ld()=1024 and w() is approx. 100.
#2 matt
12:28 Sep 04, 2006
Fixed in Subversion repository.

OP, Please verify the fix.
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 ''.