English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 06 July 2013, 00:03   #1
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
256 colors remap

Hi:

I would like to know which is the best way to convert an image to 256 colors for the miggy. My conversions don't look as good as I think they should. I should find a better palette, dithering, procedure, program or something.


Last edited by Retrofan; 06 July 2013 at 01:10.
Retrofan is offline  
Old 06 July 2013, 00:44   #2
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,743
Quote:
Originally Posted by Retrofan View Post
Hi:

I would like to know which is the best way to convert an image to 256 colors for the miggy. My conversions don't look as good as I think they should. I should find a better palette, dithering, procedure or something.

http://members.ozemail.com.au/~dekker/NEUQUANT.HTML
http://pngnq.sourceforge.net/
http://www.ximagic.com/q_index.html
(Ximagic plugin works under Gimp without problems)

http://bisqwit.iki.fi/jutut/colorquant/

http://www.cs.berkeley.edu/~dcoetzee/downloads/scolorq/
http://www.moonflare.com/code/scolorq/


And perhaps:

http://www.ilnx.cz/?q=node/5
[ Show youtube player ]

Last edited by pandy71; 06 July 2013 at 00:50.
pandy71 is offline  
Old 06 July 2013, 01:02   #3
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Lnx Amiga Image Converter seems good, but I don't find the link to download; I only get to LnxSpectrum 1.2.0 (Thanks a lot BTW)

Last edited by Retrofan; 06 July 2013 at 01:10.
Retrofan is offline  
Old 06 July 2013, 01:52   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
You're looking for an image converter?
Try ImageConverter
http://www.hd-rec.de/Archive/ImageConverter.lha
Type the command into a shell to see the available options.
PeterK is offline  
Old 06 July 2013, 03:03   #5
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Thanks, but .... puf... no guide. I don't know what command I should use to convert an image to 256 colors.

Edit: I save imageconverter to C:, I store the file I want to convert on ram, type on a CLI Imageconverter ram:xxx.jpg (the file) , and it says it saves it as xxx.png... but where? Not in ram.... I must see.

Last edited by Retrofan; 06 July 2013 at 03:13.
Retrofan is offline  
Old 06 July 2013, 04:52   #6
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Code:
ImageConverter <inputpattern> [options]
Options:
-od <dir>     specify output directory (default: current dir)
-of <file>    specify output filename without path (default: same as input)
              This parameter can contain:
              %f for the original filename stem
              %lf for the lowercased filename stem
              %c for the image count
-count        start value for the image counter
-?            show this help
-width/w  <n> specify maximum width  in pixels or percent of original size
-height/h <n> specify maximum height in pixels or percent of original size
-compress/c <n> [0...100] compression ratio for JEPG
-format/f <f> save-file-format: PNG, DPNG (dual-png icon), BMP, BMP5, ILBM, JPEG or AB3I
-force        force the width/height (ignores aspect), otherwise they are maximum values
-hq           use high quality for pattern rendering
-rx <n>       roll image in %
-ry <n>       roll image in %
-sx <n>       shift pattern 'duplicate' in % from the middle for pattern generation
-sy <n>       shift pattern 'duplicate' in % from the middle for pattern generation
-px <n>       fade zone in % to patternize image in x direction
-py <n>       fade zone in % to patternize image in y direction
-dx  <x>      cut image at position x
-dy  <y>      cut image at position y
-dxs <w>      cut image segment w long
-dys <h>      cut image segment h high
-cx <x>      crop image x offset (may be negative)
-cy <y>      crop image y offset (may be negative)
-cw <w>      image width after cropping/resizing
-ch <h>      image height after cropping/resizing
-fold         roll the image in the middle (:="rx 50 -ry 50")
-iso          generate ISO perspective image
-sharpness/s <n> sharpness for resizing [0(soft)...1(sharp)]
-interpol/i <i> set interpolation algo (none,linear,window,gui,alpha,guiold)
-rotate <d>   rotate the image d degrees clockwise
-gray         convert image to grayscale
-img <n>      load image #n, if multiple images found in file
-dither <bit> dither image to <bit> bits
-dithermode <dm> set dithermode (none,err,noise,errnoise,tk,shift)
-contrast <c> increase/decrease contrast (-100 lower contrast, 0=no change, 100 higher contrast)
-brightness <b>
-tint <$rrggbb> <mix>  tint in the given color (note the $ if hex number!) with mix 0...256
-glow <$rrggbb> add a glow effect like glow-icons
-mul <$rrggbb> multiply in the given color (note the $ if hex number!)
-sharpen <s>  sharpen or blur (-100 blur, 0=no change, 100 sharpen)
-gray         convert image to gray
-lp <amount>  low pass filter [0..1]
-hp <amount>  high pass filter [0..1]
-ic <amount>  illumination correction [0..1]
-glare <radius> <mix> fairy tale effect
-gamma <g>    0..1...2
-tilemod <mod> create spritesheet with <mod> colums
-createalpha <t> create an alpha based on brightness with t as fade zone
-alphatrans  <t> change the overall transparency [0..256...)
 
Resize/process and compress image files and save them as jpeg, png, bmp, iff-ilbm or ab3i (AmiBlitz3 Image).
If <inputpattern> is #?, an ASL requester will pop up instead of matching all files.
-od <dir> specify output directory (default: current dir)
So, either change the directory for your shell with CD RAM:
or use Imageconverter RAM:xxx.jpg -od RAM: -format PNG
PeterK is offline  
Old 06 July 2013, 18:14   #7
AmigaFriend
Registered User
 
AmigaFriend's Avatar
 
Join Date: Sep 2008
Location: CLI
Posts: 1,462
To this day I still use JASC Paint Shop Pro 9 to convert complex images to index format. I've never came to a better algorithm than JASC's for 256 color images. And also it has a nice Export feature that makes converting images a breeze and if you want you can automate conversions on the fly.

It can use also fixed palettes if you wish, so you can use your WB palette in any conversion and have the best possible image in 256 colors for you wb.

You can check these sample conversions and see for yourself. Good luck.
Attached Files
File Type: 7z Indexed Images 256.7z (297.5 KB, 205 views)
AmigaFriend is offline  
Old 06 July 2013, 18:59   #8
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Quote:
Originally Posted by AmigaFriend View Post
It can use also fixed palettes if you wish, so you can use your WB palette in any conversion and have the best possible image in 256 colors for you wb.
How do you save the 256 colors palette I am using with the amiga to use it later with it?
BTW I can't open your images, something wrong with the 7z.
Retrofan is offline  
Old 06 July 2013, 19:21   #9
AmigaFriend
Registered User
 
AmigaFriend's Avatar
 
Join Date: Sep 2008
Location: CLI
Posts: 1,462
Quote:
Originally Posted by Retrofan View Post
How do you save the 256 colors palette I am using with the amiga to use it later with it?
BTW I can't open your images, something wrong with the 7z.
I really have no idea because i've never done it. But if I had to do it I had to make a default palette a single time on PSP and then save it for future image processing.

7z works well here with 7zip 9.22. uploaded zip.
Attached Files
File Type: zip 256.zip (299.0 KB, 176 views)
AmigaFriend is offline  
Old 06 July 2013, 20:39   #10
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
I don't see any improvement from what I was using (Ultimate Paint). Before I forget, the problem with ImageConverter (at least on my system) is that it doesn't save the png file; it says it does, but it doesn't. If you use the same command line changing just to another format (jpeg or others), it works. Well, not a big problem anyway.

What I see is that sometimes a 16M colors image looks better remapped to 256 colors and sometimes it looks better just as it is. Problems are distorted colors with the original and "image created with points" for the remapped.

Edit: The result with ImageConverter is a 16M colors image, but the colors aren't distorted, they take the "image created with points" way.

Last edited by Retrofan; 06 July 2013 at 21:49.
Retrofan is offline  
Old 07 July 2013, 00:30   #11
source
Zone Friend
 
Join Date: Jul 2005
Location: Toronto, Canada
Posts: 734
Wouldn't Image FX or ADPro work just as well?
source is offline  
Old 07 July 2013, 00:39   #12
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Ehhm,,, hehehe... I don't want "as well", I just want "better" , thanks anyway.

I guess the best would be to save the 256 palette of the miggy and that any Pc program could use it, but I don't know what program /how to save it "readable".

Last edited by Retrofan; 07 July 2013 at 00:50.
Retrofan is offline  
Old 07 July 2013, 00:46   #13
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,525
The problem seems to be that you don't really understand what PeterK or AmigaFriend tried to tell you: You have to use a fixed palette to convert the images. I don't think that you really achieved that yet (or if you have you used the 'wrong' 256 colours). There will be no magic 'make it the best conversion' button in any program. You've seen what KG's achieved with a dynamic palette and 14 colours and you can see what Rebel and Cammy achieved here: http://eab.abime.net/project-classic...d-palette.html
It's really the choice of the 'right' 256 colours and using those for the conversion that makes the difference.
TCD is online now  
Old 07 July 2013, 00:54   #14
James
Registered User
 
Join Date: Mar 2010
Location: Beckenham/England
Posts: 795
Quote:
Originally Posted by Retrofan View Post
Before I forget, the problem with ImageConverter (at least on my system) is that it doesn't save the png file; it says it does, but it doesn't.
ImageConverter 2.1 used zlib.library for PNG, the 2.2 version has switched to z.library... But it appears not to work with the newer z.library used by DiskImageGUI. The old z.library on Aminet works:

http://aminet.net/util/libs/zlib.lha
James is offline  
Old 07 July 2013, 01:14   #15
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Quote:
Originally Posted by TCD View Post
The problem seems to be that you don't really understand what PeterK or AmigaFriend tried to tell you: You have to use a fixed palette to convert the images. I don't think that you really achieved that yet (or if you have you used the 'wrong' 256 colours). There will be no magic 'make it the best conversion' button in any program. You've seen what KG's achieved with a dynamic palette and 14 colours and you can see what Rebel and Cammy achieved here: http://eab.abime.net/project-classic...d-palette.html
It's really the choice of the 'right' 256 colours and using those for the conversion that makes the difference.
Yes, I archieved that (well, AmigaFriend says he doesn't know how to use the palette of the Amiga, and PeterK doesn't say a word about a fixed palette) but yes, I've been using the wrong 256 colors, as long as I can't find a way to use the 256 colors palette of the miggy on a Pc program. I know there is a wonderfull 16 colors palette for Amiga programs. I was trying to find the way to use a Pc program for 256 colors, but as it seems ¿? they can't use the Amiga 256 colors palette, I will try to save and try the 256 colors (first 16th remapped) palette to remap 16M images with ImageStudio on the miggy.
Retrofan is offline  
Old 07 July 2013, 18:07   #16
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
PPaint can take palette from WB and should be able to save it. Other programms should also able to grap palette from an image (you might save one with your palette).

However, do you really use/set a fixed 256 color palette? IMHO it doesn`t make much sense (for <=32 colors yes). Without fixed palette you might get better results when using <256 colors for image converting.
daxb is offline  
Old 07 July 2013, 18:15   #17
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Don't know, I have to try. I have to try also imageconverter using dithering.
Retrofan is offline  
Old 10 July 2013, 09:23   #18
Lanex
 
Posts: n/a
Quote:
Originally Posted by Retrofan View Post
Lnx Amiga Image Converter seems good, but I don't find the link to download; I only get to LnxSpectrum 1.2.0 (Thanks a lot BTW)
Uf... Sorry, bad link to download LnxAmigaImageConverter is corrected...

Lnx Amiga Image Converter
 
Old 10 July 2013, 12:41   #19
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,185
Thanks. But when I try to export a Ham8 image it hangs. It says "Exporting" but nothing happens.
Retrofan is offline  
Old 10 July 2013, 12:46   #20
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Quote:
I've been using the wrong 256 colors, as long as I can't find a way to use the 256 colors palette of the miggy on a Pc program.
No Retrofan, there is no fixed 256 color palette, not on the Amiga and not on the PC. the 256 is only a limitation for the number of colors, but each of them is stored in a 24 bit RGB format, which means all these 256 colors are TrueColors. The task for an image converted is it now to reduce the number of colors of a TrueColor image from some thousand to just 256 colors. And every Amiga icon with the OS 3.5 format can have its own 256 colors. But then there is another restriction, the screenmode is limited to a certain number of colors, too. And all icons and other images have to share these screen colors. That's the job of the color mapping.
PeterK is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
help to remap keyboard nuzzosono project.WHDLoad 0 12 December 2011 18:00
A4000D w/ Apollo4040 - no remap? Reynolds support.Hardware 6 02 April 2010 22:24
How to remap input? Minuous support.WinUAE 2 14 July 2008 20:26
Using a WBPattern with more than 256 colors jotd support.Other 9 20 June 2006 15:56
Using 256 colors sence2001 support.Apps 0 02 October 2004 21:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18155 seconds with 14 queries