Community
Participate
Working Groups
Created attachment 284454 [details] screenshot of snipet displaying loaded image, same image saved & reloaded Environment: Ubuntu 20.04.1 LTS (focal) eclipse: 2020_09 java: openjdk version "14.0.1" 2020-04-14 (also having issue with java-8-openjdk-amd64) swt: org.eclipse.swt_3.115.0.v20200831-1002.jar org.eclipse.swt.gtk.linux.x86_64_3.115.0.v20200831-1002.jar I can load colored images using ImageLoader.load() and display image data correctly, painting image data's on a canvas. When I save this image data (using JPEG or PNG format), image in file appears as black & white with pixel shift at each line. This occurs when image data's bytesPerLines = width * (depth/8) + N with N >= 1 (often 2). (note that ImageData.data.length = bytesPerLines * height) Original file can be loaded & correctly displayed using gimp, system' picture viewer, pngcheck report: OK: Andorre la Viella, série 5.png (786x560, 24-bit RGB, non-interlaced, 34.4%). on saved PNG file, pngcheck command reports: OK: Andorre la Viella, série 5.png (786x560, 32-bit RGB+alpha, non-interlaced, 41.1%). on saved jpeg, file commands reports: ndorre la Viella, série 5.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 786x560, components 3
Created attachment 284455 [details] original picture
Reproduced using Eclipse 4.26.0 using plugins: org.eclipse.swt_3.122.0.v20221123-2302.jar org.eclipse.swt.gtk.linux.x86_64_3.122.0.v20221123-2302.jar