| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
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() |
Version: | 1.1-current |
Created By: | dvdkhlng |
Assigned To: | matt |
Fix Version: | 1.1-current (SVN: v5411) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#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. | |
[ Return to Bugs & Features ]
|
| |