21 November 2018, 20:17 | #1 |
Long time Amiga Owner
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 56
Posts: 182
|
What's the rule of thumb for converting images
Hi you Coding masters,
So what is the rule of thumb when converting images. If I have a 320x200 BMP image and I use something like XNView to convert them to IFF what should I expect. Say I want to have 16x16 blocks that I've made in windows and I want to use them on the Amiga. I used a combination of Dpaint V and PPaint but I'm finding it's not giving me what I want. What can you tell me oh Guru of programming meditation? RC |
21 November 2018, 21:29 | #2 |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
I'd like to know too, they always seem to be in a random palette order too!
|
21 November 2018, 21:49 | #3 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Well, what are you looking to do with them? The palette order is something you have little control over when you converting images from a colour-per-pixel format to a palette-based colour look-up format like the Amiga uses. The conversion process will end up creating a palette of the most used / most suitable colours and recreating the image with them, based on one of a number of possible algorithms.
In general though, you might get better results doing the conversion on the Amiga. I generally use PPaint for that - it will read all the main PC formats too and has several options for colour reduction that give excellent results. If you're looking to use a particular palette, you can use PPaint to remap an image to those colours. Then, depending on how it looks, you can do some tweaking of the destination palette and repeat the mapping until you get what you need. The palette editing functions in PPaint and DPaint let you rearrange the colours and then remap the image to suit, but I wrote a more comprehensive palette editor that can load and save palette objects, copy and past blocks of colours and so on. It's called PaletteEd, and might be useful It's AGA-only though I'm afraid... |
22 November 2018, 12:36 | #4 | |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 524
|
Quote:
The colors of the resulting image will usually show wrong in Blitz, but a simple trick will solve this problem. Just place your game palette colors to the upper left corner of the image you're trying to convert, like this: Make sure that the colors appear in right order, so put your game palette color 0 first, then color 1, then color 2, and so on. This gives the resulting IFF image the right colors. I think XnView reads the colors from the image one pixel at a time, starting from the upper left corner and automatically creates the palette from them. The first color it sees becomes palette color 0, and the next color becomes palette color 1, and so on. --- Another important thing is the OCS color values. On AGA each RGB component can have values from 0-255, but on OCS the RGB values have a range of 0-15. So on when making AGA graphics the colors from Windows Paint can be used directly, and they'll show up exactly the same on an Amiga AGA screen. But on OCS the colors will not be 100% the same. Although I think that on OCS the RGB values convert automatically to closest equivalent values, so the image will show up, but the colors can be slightly off. But there is a workaround for this problem too. When creating your graphics on PC, just use RGB values that correspond directly to the OCS RGB values. Here are all OCS RGB component values between 0-15 and their 0-255 color equivalents. 0 -- 0 1 -- 17 2 -- 34 3 -- 51 4 -- 68 5 -- 85 6 -- 102 7 -- 119 8 -- 136 9 -- 153 10 -- 170 11 -- 187 12 -- 204 13 -- 221 14 -- 238 15 -- 255 Draw your image using only those RGB values for all colors, and the colors should show up exactly the same on an Amiga OCS screen. |
|
22 November 2018, 13:16 | #5 | ||||||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
||||||
22 November 2018, 20:28 | #6 | ||
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 524
|
Quote:
Quote:
And about the color value conversions that I posted, I think they should be right. I have checked many OCS game screenshots, opening them on Paint and checking the RGB values of different colors, and the values have always been those that are in that list. But I quickly checked some binary values from that list, and for example OCS value 4 in binary is 0100 and the corresponding RGB value of 68 is 0100 0100. And OCS value 9 is 1001 in binary and corresponding RGB value 153 is 1001 1001. And OCS value 14 is 1110 and the corresponding RGB value 238 is 1110 1110. So everything seems to be right, although I might be wrong of course. |
||
22 November 2018, 21:43 | #7 | |||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Quote:
Quote:
Quote:
|
|||
23 November 2018, 17:26 | #8 |
Long time Amiga Owner
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 56
Posts: 182
|
Hmm,
I think I'm even more confused. uhg RC |
24 November 2018, 00:33 | #9 |
Registered User
Join Date: Sep 2018
Location: Chesterfield
Posts: 44
|
I never managed to convert a picture I reduced to 32 colours on Windows (using RGB range 0-255) to look good on OCS, because the RGB values have a range of 0-15.
When using graphic software on Windows, reducing to 32 colours gets acceptable results, that's why I am doing it this way. But I'm stuck with the palette problem. So far I did not find a program on Windows to limit the colour palette to RGB 0-15 from the start. |
12 December 2018, 21:54 | #10 | |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
Quote:
You never know.... |
|
12 December 2018, 21:59 | #11 |
Registered User
Join Date: Sep 2018
Location: Chesterfield
Posts: 44
|
I wish!
|
13 December 2018, 10:27 | #13 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
I know it's probably not much help, but my PaletteEd program can be used for rearranging palettes, and also includes a feature for rounding a palette to 4-bit depth (OCS/ECS colour). This might be useful to use for defining a target palette with the required colour order and bit depth to which you can remap images in PPaint for example.
It is however AGA only I'm afraid... Last edited by Daedalus; 13 December 2018 at 11:22. |
13 December 2018, 10:39 | #14 |
Registered User
Join Date: Sep 2018
Location: Chesterfield
Posts: 44
|
Could be helpful. thanks
|
13 December 2018, 11:36 | #15 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
|
Quote:
When a palette entry is written to the high nibble, it is copied to the low nibble as well, thus multiplying the value by 17. If AGA had shown OCS images differently than OCS itself did, we would know it by now, wouldn't we ? |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving/Converting Images with Blitz | fishyfish | Coders. Blitz Basic | 0 | 21 June 2013 15:57 |
Having trouble converting certain SPS images to ADF | MethodGit | project.SPS (was CAPS) | 6 | 12 July 2011 23:03 |
converting .sit macintosh images to 880k | W4r3DeV1L | request.Other | 7 | 19 October 2009 09:50 |
Rule Update | BippyM | MarketPlace | 0 | 11 March 2006 16:25 |
Software H.I.T.L.E.R. You can’t rule the world but you can rule your software. | Pyromania | MarketPlace | 2 | 08 January 2003 22:50 |
|
|