| Anonymous | Login | Signup for a new account | 2013-06-19 09:26 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0021916 | Patches | Packages | public | 2012-05-02 09:35 | 2013-04-28 19:34 | ||||||||
| Reporter | ocean | ||||||||||||
| Assigned To | Mattias Gaertner | ||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||||
| Status | feedback | Resolution | open | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | Product Build | ||||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0021916: Timage doesn't support jpg cmyk | ||||||||||||
| Description | Colors are all wrong, example load that photo to Timage: http://www.plaveb.com/blog/Upload/FCKeditor/image/cmyk-encoded-image.jpg [^] | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Fixed in Revision | |||||||||||||
| LazTarget | - | ||||||||||||
| Widgetset | Win32/Win64 | ||||||||||||
| Attached Files | |||||||||||||
Relationships |
|||||||
|
|||||||
Notes |
|
|
(0061283) ocean (reporter) 2012-07-29 19:26 |
Fix for fpreadjpeg.pas Change this line: if (FInfo.jpeg_color_space = JCS_CMYK) then To this: if (FInfo.jpeg_color_space = JCS_CMYK) or (FInfo.jpeg_color_space = JCS_YCCK) then I have tested with this program. If I add fixed fpreadjpeg.pas to source dir, image saves correctly. program jp; {$mode objfpc}{$H+} uses classes, sysutils, FPImage, FPreadjpeg, FPWritePNG; procedure test; var image: TFPCustomImage; writer: TFPCustomImageWriter; begin image := TFPMemoryImage.Create(0,0); image.Loadfromfile('c:/bug/source.jpg'); writer := TFPWriterPNG.Create; image.SaveToFile('c:/bug/dest.png', writer); image.Free; writer.free; end; begin test; end. |
|
(0061286) Marco van de Voort (manager) 2012-07-30 01:31 |
ycck: http://www.jpedal.org/PDFblog/2011/10/ycck-color-conversion-in-pdf-files/ [^] |
|
(0061303) ocean (reporter) 2012-07-30 20:43 |
Thanks for link. I believe no other code changes are needed. All previously broken images I have tested work after my change. Colors are also correct. |
|
(0061311) Marco van de Voort (manager) 2012-07-31 11:15 |
According to the link it shouldn't, which is why I didn't commit the fix yet. |
|
(0061372) ocean (reporter) 2012-08-03 08:54 |
Attached CMYK image. Colors look slightly different (with or without my change, ofcourse) Seems current code just handles YCCK better. |
|
(0061762) ocean (reporter) 2012-08-20 17:05 |
Patch attached. Added separate function for YCCK and comment about current CMYK not beeing 100% accurate. Please review and apply if okay |
|
(0065427) ocean (reporter) 2013-02-03 15:27 |
Patch still applies. If I need to change it, please advise. I created the patch so, that it doesn't modify existing code, it only adds this case. |
|
(0065965) Reinier Olislagers (developer) 2013-03-01 13:16 |
Any news on this? If I understand ocean correctly, the patch only adds support for YCCK and doesn't change handling of any images marked as CMYK, so 0061311 doesn't make sense (AFAIK that link deals with images marked as CMYK but encoded with YCCK) |
|
(0066021) ocean (reporter) 2013-03-05 11:24 |
Yes, and patch should be simple change, if you look at it. Currently YCCK is loaded as 3 channel and it looks really bad. Attached test, just run and look file dest.jpg with/without patch. BTW, bug should be in FPC, not Lazarus.. |
|
(0067226) Juha Manninen (developer) 2013-04-28 19:34 |
Marco, why this issue is assigned to Mattias? The patch is for FPC libraries. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-02 09:35 | ocean | New Issue | |
| 2012-05-02 09:35 | ocean | Widgetset | => Win32/Win64 |
| 2012-05-19 01:19 | Juha Manninen | Relationship added | related to 0022069 |
| 2012-07-29 19:26 | ocean | Note Added: 0061283 | |
| 2012-07-29 22:38 | Maxim Ganetsky | Project | Lazarus => FPC |
| 2012-07-30 01:31 | Marco van de Voort | Note Added: 0061286 | |
| 2012-07-30 20:43 | ocean | Note Added: 0061303 | |
| 2012-07-31 11:15 | Marco van de Voort | Note Added: 0061311 | |
| 2012-08-03 08:53 | ocean | File Added: cmykjpg.zip | |
| 2012-08-03 08:54 | ocean | Note Added: 0061372 | |
| 2012-08-04 22:15 | Jonas Maebe | FPCOldBugId | => 0 |
| 2012-08-04 22:15 | Jonas Maebe | Category | LCL => Packages |
| 2012-08-04 22:15 | Jonas Maebe | Product Version | 1.1 (SVN) => |
| 2012-08-20 17:04 | ocean | File Added: add_jpeg_YCCK.patch | |
| 2012-08-20 17:05 | ocean | Note Added: 0061762 | |
| 2012-08-31 03:21 | Marco van de Voort | Status | new => assigned |
| 2012-08-31 03:21 | Marco van de Voort | Assigned To | => Mattias Gaertner |
| 2012-08-31 03:21 | Marco van de Voort | Project | FPC => Patches |
| 2013-02-03 15:27 | ocean | Note Added: 0065427 | |
| 2013-03-01 13:16 | Reinier Olislagers | Note Added: 0065965 | |
| 2013-03-05 11:22 | ocean | File Added: YCCK_test.zip | |
| 2013-03-05 11:24 | ocean | Note Added: 0066021 | |
| 2013-04-04 16:23 | Reinier Olislagers | Note Added: 0066803 | |
| 2013-04-04 17:38 | Reinier Olislagers | Note Deleted: 0066803 | |
| 2013-04-28 19:34 | Juha Manninen | LazTarget | => - |
| 2013-04-28 19:34 | Juha Manninen | Note Added: 0067226 | |
| 2013-04-28 19:34 | Juha Manninen | Status | assigned => feedback |
| Main | My View | View Issues | Change Log | Roadmap |



