ivop Posted January 19, 2010 Share Posted January 19, 2010 (edited) I'm not being arsey with you it's just when two of us have written code specifically to do this so that it's easier to add the mid scanline, pmg and any other stuff then you post images that aren't in A8 palette, then are but double the colours or have the source colours reduced by changing brightness it's hard to compare which code has the best quantization method. So far the pnmquant LN looks the best but to be honest I prefer my Exile and Dune, but based on the pnmquant LN one I'm going to include median cut algorithm in my code as my LN still doesn't look as good even with the contrast/brightness adjustment. There's no problem with there being 3 apps that do the same thing as long as it's all to the benefit of the end user. It's not my intention to write a third app. I just couldn't resist trying out some things with readily available tools. But I hope my experiments benefit both your applications. To be clear, and without posting further images, I got the best results with the following algorithm: - prepare source material (320x240, enhance contrast etc...) - scale to 160x240 - split in 240 lines - odd lines: pnmquant -spreadbrightness -meanpixel -floyd - even lines: pnmquant -spreadluminosity -meanpixel -floyd - merge - remap to 256 colour atari palette, saturation 60 - remap to 128 colour atari palette, saturation 60 - scale to 320x240, no interpolation This is exactly how the last LN image was created. Best regards, --Ivo Edited January 19, 2010 by ivop Quote Link to comment Share on other sites More sharing options...
PeteD Posted January 19, 2010 Share Posted January 19, 2010 Thanks for the info I'd totally forgotten about median cut algorithm before seeing your conversions were getting a better spread of colours than mine (and googling to see what pnmquant used) so hopefully adding that will improve it, even a little helps in the long run. I'll have to try post process remap as well because I do my remap first. I also tried making the popularity count based on the RGB to A8 remapper then remap the whole RGB line again to that 4 colour A8 palette but that doesn't seem to work as well as pre-processing the image. Pete Quote Link to comment Share on other sites More sharing options...
José Pereira Posted January 19, 2010 Share Posted January 19, 2010 Sorry to be here again. PeteD, I think I understand what you're saying. I changed the .txt into .bat. I understand now (Height,... what I want to see and wich file I want to save,...) But now, where in the .bat can I edit all the parameters I want? Here is it again with the .bat and a LN2 screen (.gif) as an example. Can you simply write the parameters that it converts the image into A8colours, this image screen height=144, wide=240 (1:1ratio) and to save into .mic (to use on G2F)? If you can write this as an ex. than all the others will be simple filename changing for me... Sorry, but I never done something like this. Quantizator096.zip Thanks and sorry to take your time. Greetings. José Pereira. Quote Link to comment Share on other sites More sharing options...
PeteD Posted January 19, 2010 Share Posted January 19, 2010 You don't rename the readme.txt, create a new text file instead, rename that one to quant.bat (or any name.bat) and edit that. quant.zip That bat file contains these options /h=-1 to stop the app rescaling the Y size /mode=local checks local colour similarity /dist=euclid to make the colour distance check work on euclidian logic /lock=000000 to lock black (rgb 000000) as with that LN image that's one thing you need to do Pete Quote Link to comment Share on other sites More sharing options...
José Pereira Posted January 19, 2010 Share Posted January 19, 2010 Sorry. No way... I drop the .gif file there on you .bat file. Something Runs quickly and nothing. You're probably ... with me. But why I cannot do this? I'm crazy. José Pereira. Quote Link to comment Share on other sites More sharing options...
PeteD Posted January 19, 2010 Share Posted January 19, 2010 Did you put quant.bat in the same folder as the quantizator.exe? I just tested it and it works fine here. Does the app work if you just drop the gif onto that exe? If not then the bat wont work either, you're still missing something from your PC. Pete Quote Link to comment Share on other sites More sharing options...
analmux Posted January 19, 2010 Share Posted January 19, 2010 Nice work guys, :thumbsup: .... But now try to rotate this Ninja picture 90 degrees, and try converting/quantizing again...I'm curious what the result will be. Anyway, PM-underlays, PM-overlays and GED-type midscanline Palette-changes will help us more in that situation. Remember: Midscanline changes in the left part of the screen are much coarser (due to RAM-refresh DMA cycles stolen), so the easiest would be to put all PM-underlays in the left part, and in the meantime prepare X,Y,Acc registers for GED-actions in the right part. Then some nice linear effects should be possible, I guess. Quote Link to comment Share on other sites More sharing options...
PeteD Posted January 19, 2010 Share Posted January 19, 2010 Nice work guys, :thumbsup: .... But now try to rotate this Ninja picture 90 degrees, and try converting/quantizing again...I'm curious what the result will be. Anyway, PM-underlays, PM-overlays and GED-type midscanline Palette-changes will help us more in that situation. Remember: Midscanline changes in the left part of the screen are much coarser (due to RAM-refresh DMA cycles stolen), so the easiest would be to put all PM-underlays in the left part, and in the meantime prepare X,Y,Acc registers for GED-actions in the right part. Then some nice linear effects should be possible, I guess. Rotating it will mean more missing colours because there'll be more colours per line to quantize. At some points there's all that red, blue, grey, black, white, skin tones.. I'm just going to add as many options as I can to my stuff. 5 colour char mode is another possibility. You'll have very little time to change registers every modeline but then 5 colours per line may be worth it. Then of course there's working out which the 4th and 5th colours should be because you want them to not be in the same square. There's a LOT of options to support even 1/2 of what's possible with an app like this.. Pete Quote Link to comment Share on other sites More sharing options...
ivop Posted January 19, 2010 Share Posted January 19, 2010 But now try to rotate this Ninja picture 90 degrees, and try converting/quantizing again...I'm curious what the result will be. Here you are: Better than I expected, but still pretty bad Quote Link to comment Share on other sites More sharing options...
PeteD Posted January 19, 2010 Share Posted January 19, 2010 That's kind of what I expected, stripes Pete Quote Link to comment Share on other sites More sharing options...
José Pereira Posted January 22, 2010 Share Posted January 22, 2010 This comes to my mind right now. Stays with "Quantizator" like it is now: 1.)- 4majour colours and DLIs. and save as Image1. 2.)- Get another 4majour colours and save only this ones (omething like unused colours). Now with G2F: 1.)- Load Point2 and do BMP->PMG (Rework if necessary this 4colours to fix in the 4PMGs. sizes, choose PRIOR mode and PMGs. size you want). 2.)- Load now the first one BMP and "voila". Even in PRIOR0 you'll get an 8colours Picture. What you say about this? It is possible, isn't it? Greetings. José Pereira. Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 25, 2010 Author Share Posted January 25, 2010 New version of Quantizator - 098. This is mostly the bug-fix version, because the previous version was very buggy. Quantizator098.zip Quote Link to comment Share on other sites More sharing options...
ceti331 Posted April 29, 2010 Share Posted April 29, 2010 (edited) Greetings, interesting app. Q1How involved is the ditering here - Does it do ordered dither aware of the colour aproximations & hence additional error in the scanlines above/below Q2 Has anyone tried a general converter using 4th tile colour. (even just one using 1 palette for the whole screen... i.e. trying to pick the most effective color for the 4th. Edited April 29, 2010 by ceti331 Quote Link to comment Share on other sites More sharing options...
tebe Posted April 20, 2012 Share Posted April 20, 2012 ilmenit create new quality http://atarionline.pl/forum/comments.php?DiscussionID=1611&page=7#Item_41 http://atarionline.pl/forum/?PostBackAction=Download&AttachmentID=2273 1 Quote Link to comment Share on other sites More sharing options...
AtariNerd Posted April 20, 2012 Share Posted April 20, 2012 (edited) Just playing around with it - does take it awhile to finish. Screen-shot taken from the Amiga version of Space Harrier, saved as undithered in this case. spquantizator098.xex Edited April 20, 2012 by AtariNerd Quote Link to comment Share on other sites More sharing options...
analmux Posted April 20, 2012 Share Posted April 20, 2012 ilmenit create new quality ... Nice work. If I'm correct only DLIs are used to change the font of the playfield gfx. No PM gfx used, am I right? Especially interesting then. Quote Link to comment Share on other sites More sharing options...
ilmenit Posted April 20, 2012 Author Share Posted April 20, 2012 (edited) Just playing around with it - does take it awhile to finish. The longer you wait, the better result you get. Looking at the original picture I think that after a few hours of optimization the program should create almost exact copy. Nice work. If I'm correct only DLIs are used to change the font of the playfield gfx. No PM gfx used, am I right? Especially interesting then RastaConverter optimizes raster program and does multiple changes in each line of playfield colors, player colors and player positions. Player shapes are set once per line, players size is always *4. Look at the created output files and/or sources for more information. The 1.0 version will be available soon. Edited April 20, 2012 by ilmenit Quote Link to comment Share on other sites More sharing options...
snicklin Posted April 20, 2012 Share Posted April 20, 2012 All we need to do now is to have a distributed computing project to create a video sequence! Quote Link to comment Share on other sites More sharing options...
emkay Posted April 20, 2012 Share Posted April 20, 2012 (edited) Having the ability of changing approx. 9 registers per scanline, it should be useful to have a closer look at the real "colour bits" ... Colourful pictures look different, when the bits get visuable... One scanline stretched ... Edited April 20, 2012 by emkay Quote Link to comment Share on other sites More sharing options...
snicklin Posted April 20, 2012 Share Posted April 20, 2012 What a great program! I am going to leave my machine on all night processing a couple of pictures on my dual core PC. Feature Request: Would it be possible to add a "Maximum Evaluations" parameter? I am working on an automation framework and would love to add this to it. However, I would need the program to stop at some point. If statistics could be written to a file, this would be great. Feature Request 2: Could a "Resume" feature be added so that you can continue where you finished last time? Quote Link to comment Share on other sites More sharing options...
analmux Posted April 20, 2012 Share Posted April 20, 2012 (edited) Nice work. If I'm correct only DLIs are used to change the font of the playfield gfx. No PM gfx used, am I right? Especially interesting then. By the way, I made a mistake: I mean 'palette' instead of 'font' --> "Nice work. If I'm correct only DLIs are used to change the palette of the playfield gfx. No PM gfx used, am I right? Especially interesting then." (& Thanks, Ilmenit, for the answer.) Edited April 20, 2012 by analmux Quote Link to comment Share on other sites More sharing options...
tebe Posted April 20, 2012 Share Posted April 20, 2012 If I'm correct only DLIs are used to change the palette of the playfield gfx. No PM gfx used, am I right? Especially interesting then." (& Thanks, Ilmenit, for the answer.) this is bitmap mode, LMS per line, raster program, GED- g2f equivalent, PMG used Quote Link to comment Share on other sites More sharing options...
ilmenit Posted April 20, 2012 Author Share Posted April 20, 2012 (edited) Good ideas for features - both will be implemented. New version of some files attached - replace the previous ones. Changes: - fixed bug in the generator (thanks to Jakub Husak) - new options: /cdither, /dither, /init=less, /euclid RastaConverterBeta2.zip Edited April 20, 2012 by ilmenit 2 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted April 21, 2012 Share Posted April 21, 2012 Good ideas for features - both will be implemented. New version of some files attached - replace the previous ones. Changes: - fixed bug in the generator (thanks to Jakub Husak) - new options: /cdither, /dither, /init=less, /euclid Now I have a good excuse to change my computer! It would be nice if you'll make a simple graphic interface. Quote Link to comment Share on other sites More sharing options...
snicklin Posted April 21, 2012 Share Posted April 21, 2012 (edited) Good ideas for features - both will be implemented. - fixed bug in the generator (thanks to Jakub Husak) - new options: /cdither, /dither, /init=less, /euclid Thank you very much! I just need a little advice now. I would like to use these pictures on the Atari. Will RastaConverter output files other than *.png? Then what is best to do, open the file with g2f or AIS? In other words, how can I actually use these wonderful new pictures? p.s. I have a picture which I am converting. It has surpassed 3 million evaluations and it is still improving! Edited April 21, 2012 by snicklin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.