bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
400 stars 55 forks source link

LazPaint doesnt have proper palette edition #22

Open circular17 opened 6 years ago

circular17 commented 6 years ago

It converts to "true color" and then save as "best" 256 color palette.

Here an same image edited and saved with four graphic editors (Paint, Paint Shop Pro 4, PictBear and Lazpaint) to check the difference.


edit: sorry, I will try explain better the problem.

I'm noticed are several image editor saving wrong colors indexes. And only a few do it properly. Unfortunately LazPaint is one making this wrong.

The number is indicating color index I will say the color index in this order: top right square, bottom right square, top left square, bottom left square, center (pink)

This is the original image https://s6.postimg.org/4cjwgv6up/original_index.png The color index is: 1, 2, 3, 4, 0 - as indicates the image, of course :P

Now, we will modify and save the image in these programs: LazPaint, RealWorld Paint, PictBear, Paint Shop Pro 4.

The image edited with LazPaint: https://s6.postimg.org/slefetwmp/image_Laz_Paint.png The color index now is: 4, 1, 3, 0, 2 - wrong index

The image edited with RWPaint: https://s6.postimg.org/6v5lhjskx/image_RWPaint.png The color index now is: 1, 4, 2, 3, 0 - wrong index

The image edited with PictBear: https://s6.postimg.org/v06az9cvl/image_Pict_Bear.png The color index now is: 1, 2, 3, 4, 0 - correct index

The image edited with Paint Shop Pro 4: https://s6.postimg.org/pq1c7ysmp/image_Paint_Shot_PPro4.png The color index now is: 1, 2, 3, 4, 0 - correct index

Note: You can view the color index with Paint Shop Pro 4 using the color selector tool example: https://s6.postimg.org/nb9gnjcdt/psp4_colors.gif

From forum: https://forum.lazarus.freepascal.org/index.php/topic,38074.0.html

c-sanchez commented 4 years ago

Yes, I'm who did this issue previously, all this is related about the Index Color support in LazPaint Allow edit the color index palette, convert image to full or indexed color, and anything related since i knew about the existence of the color index i feel that a raster editor without this is incomplete also this can be very important for game graphics development by example.

indexcolor