[Request] PNG8 Palette Selection

Discussion and feedback on Construct 2

Post » Mon Jun 10, 2013 11:42 am

Hi,

Recently I've been able to reduce my download overhead by up to 80% (though overall about 50%) through further reducing outputted image palettes, then rerunning through PNGOUT, OptiPNG, and DeflOpt.

Here's an example of quality loss and size difference (the size difference is even before running through PNGOUT, OptiPNG, and DeflOpt):



Of course many images don't work at 16 colours, but many do at 64 or 128.

I'd imagine that the dialog could look something like this.

Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,945

Post » Mon Jun 10, 2013 1:52 pm

If you import images with 16 colors in to Construct 2, does it manage to export them at the same reduced size? (The exporter does run all PNG-8s through PNGOut).

I'm not sure about the implementation of an optimal quality palette reduction, so it might be better to do this in external tools then import them with their colors reduced.
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Mon Jun 10, 2013 3:01 pm

@Ashley yep, when importing a 16 colour palette, that is maintained on export.

According to the PNGOut documentation, you can override bit depth with the /d# flag? Would this do optimal palette reduction automatically?
Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,945

Post » Mon Jun 10, 2013 3:22 pm

I'm not sure, I haven't looked in to this area much. Does it work for you? There are lots of different algorithms to reduce color depth, such as simple rounding, perceptual rounding, dithering, and probably other kinds of analysis I'm not aware of. Which does PNGOut do? Which are you after specifically?
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Mon Jun 10, 2013 3:57 pm

@Ashley you're right, PNGOut doesn't handle color depth reduction automatically. Never mind, I've got a batch process in Fireworks that handles the conversion cleanly enough. I'll stick with that for the time being. Thanks for the replies!
Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,945

Post » Mon Jun 10, 2013 4:22 pm

@Ashley : you can add some PNG quantization to approach that via PNGQuant in the tools proposed by Construct : http://pngquant.org/
B
33
S
9
G
6
Posts: 708
Reputation: 6,704

Post » Mon Jun 10, 2013 4:32 pm

We already use PNGNQi to do a high-quality 256-color reduction of high-color images when you set to use PNG-8 in the editor. Does that not do the same job mostly?
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Tue Jun 11, 2013 9:12 am

@Ashley : ah, then yes, the job is the same. PNGQuant is using a variation on the Median Cut algorithm to do the color reduction while PNGNQi is using a variation over a neural network. In the end, the result should be close .
B
33
S
9
G
6
Posts: 708
Reputation: 6,704


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests