25 May 2016, 12:53 | #1 |
Registered User
Join Date: Dec 2015
Location: Poland
Posts: 189
|
IFF ILBM Commpression Optimiser
Hello
While doing graphics for Ryggar i have found interesting behaviour which would lead increasing or decreaseing commpressibility of standard AMIGA IFF files. Lets take standard 16colour palette files. We could have 16x15x14x13x12x11x10x9x8x7x6x5x4x3x2x1 combinations where each of the colour can be placed in different colour register creating in effect exactly the same picture (lossless) but different bitmap, which in the end lead to better or lower compressability of such picture. I have included the examples for you to see. There si exactly 4621bytes difference between zip archive contain exactly the same graphics just with different colour registers used. Such tool could be very usable for 64kB Intro makers, where every bit counts, but in generall use also. Maybe someone know such tool and if not maybe someone could create one? Last edited by Trachu; 25 May 2016 at 15:22. |
25 May 2016, 22:54 | #2 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
yeah! great trick! but how it works?
|
25 May 2016, 23:13 | #3 |
Registered User
Join Date: Dec 2015
Location: Poland
Posts: 189
|
its simple. Just swap colour positions:
alienvspredator640512-4c_output2.iff has such colours 0 0 17 68 68 119 204 221 238 119 136 170 alienvspredator640512-4c_output5.iff uses 0 0 17 204 221 238 119 136 170 68 68 119 Different colour positions is creating different 0 and 1 placement hence creating more or less compressible data. |
25 May 2016, 23:50 | #4 |
Code Fiddler
Join Date: Apr 2016
Location: UK
Age: 48
Posts: 81
|
Interesting idea. Re-ordering the palette such that the RLE can be more effective on the actual bitmap data. Similar behaviour can be observed by re-ordering files in solid archives.
|
26 May 2016, 11:03 | #5 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
Nice idea
Perhaps the better palette can be predicted (vs try all palettes,pack,compare) For each pixel count what kind of pixel change (from previous pixel) we have like color0 to color1,etc... Then we will obtain solmething like color0 to color1 : 1300 pixels color1 to color2 : 20 pixels color2 to color3 : 400 pixels color3 to color4 : 500 pixels etc... Then if the max occurrence is (say) color3 to color8 ==> adjust palette so that color3 and color8 would only differ on a single bitplane bit Alain |
28 May 2016, 13:46 | #6 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 471
|
Interesting, indeed.
Well, for your own productions you can create an own IFF chunk for optimal compression. just need to adapt import/export plugins for e.g. PersonalPaint. Last edited by Cylon; 29 May 2016 at 02:51. |
28 May 2016, 15:26 | #7 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
so ILBM performs run-length encoding separately on each bitplane? interesting...
so what is the algorithm for picking which colours to swap? is there an efficient way or just brute-force? |
29 May 2016, 08:32 | #8 | |
Registered User
Join Date: Dec 2015
Location: Poland
Posts: 189
|
Quote:
colour 0 (black) -147197 colour 1 (dark blue) - 89942 colour 2 (brightest blue - almost white) - 31913 colour 3 (middle blue) - 58628 in case of output6 which is almost as compressible colour 0 (black) -147197 colour 1 (brightest blue - almost white) - 31913 colour 2 (dark blue) - 89942 colour 3 (middle blue) - 58628 i believe what you say is some option for optimisation, but it still depends which pixel is the neighbour of which, but i was thinking about normal PC program where speed is not an issue. Last edited by Trachu; 28 October 2016 at 19:25. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OS X Quick Look plugin for IFF ILBM images | dalton | News | 17 | 01 September 2021 22:24 |
iff/ilbm on NDOS disk ???? | SkulleateR | support.Other | 10 | 11 February 2016 18:47 |
converting pc pictures to iff or ilbm files | locksmith | Amiga scene | 12 | 14 September 2015 15:54 |
Slide show Pictures Question - IFF ILBM | Peter | support.Apps | 20 | 04 December 2012 05:41 |
IFF/ILBM structures .... | freddix | Coders. General | 7 | 18 September 2006 09:54 |
|
|