MegaZeux Image Resampler :frostyangel:
#1
Posted 03 June 2012 - 04:30 PM
Download Here: http://www.bitoblivi...geResampler.exe
Find me on IRC if there's a problem, and if there's enough interest I'll post source and send it up to the Vault.
WTF is this?
I remember feeling frustrated that most character conversion tools were limited in size because they did not bother to try to reuse characters or use characters that are "close" to others. This does that.
How to use:
- Import PNG/JPG/BMP/GIF (basically anything GDI supports) with the Load Image button
- Set your desired target MZM size
- Click Resample
- Adjust pixel diversity (and size if necessary), clicking Resample on each try, until the "Final" character count is below 255 (it will turn green and the export button will light up)
- Click Export to save out two files -- same stem name with two extensions (MZM and CHR)
- Import into MZX
- ???
- PROFIT!
#2
Posted 04 June 2012 - 08:20 AM
This
is
freakin
Awesome.
EDIT:
I do wish it would output partial charsets, though... but that'd kinda mess up the whole mzm thing... I dunno, just a thought.
This post has been edited by ThDPro: 04 June 2012 - 08:22 AM
Better Than Nothing - DOMINATION - Commander Keen: Heroes Lost - Welkin - A Confectioner's Recipe - random ThDPro music stuff
<Risu21121> if you're not going to make a good game, you might as well make a blatantly racist one.
<Kuddy> Testicles.
"Where are my folder?" - KKairos
#3
Posted 04 June 2012 - 09:33 AM
ThDPro, on 04 June 2012 - 06:20 PM, said:
I dunno, seems no reason why it couldn't. I created a similar tool in MZX that outputs MZM+partial charset for a project. It only reuses identical chars, though, not similar chars.
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#4
Posted 04 June 2012 - 01:23 PM
I'm still trying to figure out a good way to do better similarity checking (since right now on some images it completely messes up and makes it look much worse than I feel it should) and I'll probably add some sort of Color->Mono dithering instead of just a 1bpp conversion (since I'm fairly positive, given the results, that GDI is essentially using a rudimentary canny edge detection algorithm to draw out the boundaries). Depending on how bored I get, I might decide to expand it further, so ideas are welcome.
#5
Posted 04 June 2012 - 04:02 PM
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#6
Posted 04 June 2012 - 05:06 PM
- Fix render bug with pixel sizes not calculating fill position
- Add partial charset export ability
- Lower-resolution UI dialog
- Color-coding of unique characters to see a big-picture of character reuse
- Clickable result image to see what characters are being reused with the clicked character
The feedback is appreciated!
#7
Posted 05 June 2012 - 01:58 PM
- Partial charset export
- New dialog layout
- Fine-tune editing of characters in-program
- Color-coding characters to show where they are being reused
- Clicking into result image to select a character, selects all identical characters
Version 1.1 Downloadable here: http://www.bitoblivi...ampler_v1.1.exe
Once again, bug reports and feature requests are welcome!
#8
Posted 11 June 2012 - 10:35 PM
How do you use it? Load an image, if the image is >1bpp, the program will ask if you want to dither or not.
Dithering makes it harder to reuse characters, so tread carefully! (I plan to resequence the character editing with the reuse of characters to fix this)
http://www.bitoblivi...pler_v1.1.5.zip
#9
Posted 13 June 2012 - 02:30 AM
Sampling, resizing the mzm dimensions, and re-sampling again causes the image quality to degrade, even if you revert back to the default dimensions and resample.
On a fresh start click "Load Image", and close the pop-up that appears. An unhandled exception will occur if no image is already loaded. If one exists, the dithering option can be changed here.
<phthalocyanine> they make experiences.
<Nadir> demos, more like
<Nadir> a glimpse into what could have been if mzx wasn't such a bore to work with
<Nadir> actually, i'm being unfair
<Nadir> i would have made mzx games if it was capable of running on more than 20 computers worldwide in 1998
<Nadir> >:D
<%Alice> functor
<%nooodl> i hear C++ has a thing called functors and they're completely different from Haskell functors...
<rorirover> the result is the most horrid thing in C++, it's basically black magic and it transforms any code you're writing into some eldritch monstrosity
#10
Posted 20 June 2012 - 02:57 AM
Feature additions to target for next version:
- Stacking adjustment commands
- Palette integration
- Different "similarity weighting" mechanism to choose from
- Better character reuse on the dithering algorithm
- Character set overlapping (add MZX default, alphabet, etc etc)
- Better graphics/rendering/optimization speed (F U GDI)
Things that are likely to also be in there:
- Mono support for Linux users
- Color dithering algorithm
- Full-screen-image mode
Things that may be in there, but probably not:
- Write canny filter to replace the shitty 50/50 1bpp conversion
- Edge smoothing
- Batch mode
Things that won't be in there for sure:
- Forth codes (regardless of how well they do keys)
#11
Posted 23 June 2012 - 10:59 PM
Quote
- Stacking adjustment commands New architecture makes this much easier.
- Palette integration
- Different "similarity weighting" mechanism to choose from Re-implemented quadrant-based density comparison, hopefully it will work properly this time.
- Better character reuse on the dithering algorithm See above; hopefully this will help with character reuse on dithering.
- Character set overlapping (add MZX default, alphabet, etc etc)
- Better graphics/rendering/optimization speed (F U GDI) Added character cache-back to fix this somewhat, eliminating a few tight loops.
Things that are likely to also be in there:
- Mono support for Linux users It took another UI redesign, but this version is geared around a Mono compatibility target.
- Color dithering algorithm
- Full-screen-image mode
Things that may be in there, but probably not:
- Write canny filter to replace the shitty 50/50 1bpp conversion
- Edge smoothing
- Batch mode
I've been working on this to restructure it and clean up the functionality somewhat; execution flow was confusing and scattered. At this version, I'll be posting source code to Github.
#12
Posted 21 January 2013 - 12:17 PM
MZXImageResampler
<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this
#13
Posted 06 February 2013 - 04:21 PM
It won't let me use a starting character index higher than 100. Anything I put in higher than 100 becomes 100. This is even if the resulting image uses less than 155 characters (Mine used 79)
Very, very odd.
If MZXGiant still reads the forums, do you think you could enlighten us as to why you made that the limit?
For the curious, I'm trying to put two mzximageresampled images into one charset. One is about 20 characters and happily fits above the standard "letters" rows, and one is 79 characters and happily fits below them. I'd like to be able to export the charset starting at 128 so I can easily accomodate this without having to do any reshuffling inside MZX and while keeping my font.
EDIT: Wow... Starting character index is just BROKEN in general.
As an example, if you use a starting character index of 26... Instead of giving you a partial charset thats identical to one with a starting character index of 0 and giving you an MZM with everything adjusted so that p?? is +26 as expected, it instead gives you that MZM and a charset with 26 extra filled characters at the start!
Did MZXGiant not know you can load partial charsets with an offset??
<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this
#14
Posted 06 February 2013 - 07:49 PM
Quote
MERCY, WHAT A SCANDAL
GET ME MY SMELLING SALTS
#15
Posted 06 February 2013 - 10:08 PM
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#16
Posted 07 February 2013 - 04:05 PM
<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this
#17
Posted 08 February 2013 - 11:46 PM
Source for release is here: http://www.digitalmz...sampler_src.zip