Talk about development tools here
Moderator: BigEvilCorporation
-
matteus
- Very interested
- Posts: 336
- Joined: Mon Feb 04, 2008 1:41 pm
Post
by matteus » Mon Feb 24, 2014 1:19 pm
r57shell wrote:As far as I know, there is no way to set certain order of colors in ImageMagick.
Hey,
r57shell thank you for your reply! A friend has suggested that Python Imaging Library (PIL) may do the job... *fingers crossed*
-
matteus
- Very interested
- Posts: 336
- Joined: Mon Feb 04, 2008 1:41 pm
Post
by matteus » Tue Feb 25, 2014 10:41 am
Stef wrote:I'm now using Gimp to set the transparent color as you can re organize the colormap as you want. I believe that you can even use the real transparent color feature of the PNG format with SGDK (at least it worked on my sprite sample).
I mass batch processed the frames using IrfanView. I set the images to use 16 colours and used the default background colour RGB(36,36,36) as the transparency.
IrfanView is an improvement over my old process as it sticks dummy palette colours set to Black into my PNGs, sadly the SGDK fails to pick up on the transparency though
-
Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
-
Contact:
Post
by Stef » Tue Feb 25, 2014 1:01 pm
Are your output images in 8bpp format with transparency enabled ?
If yes then this is a problem from rescomp which do not recognize the transparency color information from PNG :-/
I will have a look in that, i hope it does not come from the PNG library i am using.
-
matteus
- Very interested
- Posts: 336
- Joined: Mon Feb 04, 2008 1:41 pm
Post
by matteus » Tue Feb 25, 2014 1:18 pm
Stef wrote:Are your output images in 8bpp format with transparency enabled ?
If yes then this is a problem from rescomp which do not recognize the transparency color information from PNG :-/
I will have a look in that, i hope it does not come from the PNG library i am using.
yes the image is 8bpp with transparency enabled. It might be IrfanViews export that's the issue. I shall upload a sample image tonight for you.
-
Stef
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
-
Contact:
Post
by Stef » Tue Feb 25, 2014 4:43 pm
It's probably an issue in rescomp, i don't think i did something special to handle the transparent color and maybe i was lucky with my sprite sample where it worked on first shot.
-
kubilus1
- Very interested
- Posts: 237
- Joined: Thu Aug 16, 2012 2:25 am
-
Contact:
Post
by kubilus1 » Tue Feb 25, 2014 8:44 pm
r57shell wrote:As far as I know, there is no way to set certain order of colors in ImageMagick.
Not directly, but you can set an image to use the same color palette as another image using ImageMagick. SO you can create an ordered color palette image in The Gimp and then use that to batch set the color palette for each of your images. (at least for BMP you can do this.)
-
r57shell
- Very interested
- Posts: 478
- Joined: Sun Dec 23, 2012 1:30 pm
- Location: Russia
-
Contact:
Post
by r57shell » Wed Feb 26, 2014 11:08 am
As far as I know, it supports to set Palette, but order in Palette is NOT saved.
May be I'm wrong...
-
kubilus1
- Very interested
- Posts: 237
- Joined: Thu Aug 16, 2012 2:25 am
-
Contact:
Post
by kubilus1 » Wed Feb 26, 2014 8:46 pm
r57shell, I believe you are right about that afterall.
It does seem that ImageMagick will apply a palette consistently, however. So even though it doesn't preserve the order of the palette bitmap, it uses the same order every time.
In my tests, it seems that color index 0 will be black. If you want another color at index 0 your are out of luck.
-
matteus
- Very interested
- Posts: 336
- Joined: Mon Feb 04, 2008 1:41 pm
Post
by matteus » Thu Feb 27, 2014 12:38 am
kubilus1 wrote:r57shell, I believe you are right about that afterall.
It does seem that ImageMagick will apply a palette consistently, however. So even though it doesn't preserve the order of the palette bitmap, it uses the same order every time.
In my tests, it seems that color index 0 will be black. If you want another color at index 0 your are out of luck.
So ultimately I have to use RGB(36,36,36) as my black and use RGB(0,0,0) as my transparency?
-
kubilus1
- Very interested
- Posts: 237
- Joined: Thu Aug 16, 2012 2:25 am
-
Contact:
Post
by kubilus1 » Thu Feb 27, 2014 2:41 am
If you are using ImageMagick to set the palettes then something like that would be the case, but that would cost you a precious color slot that you wouldn't want to lose!