Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: arclance on June 20, 2011, 12:06:45 am

Title: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on June 20, 2011, 12:06:45 am
Tileset Resizer v2.5
Resize Tilesets For Larger or Smaller Monitors

Tileset Resizer is a collection of Octave (http://www.gnu.org/software/octave/) Functions to resize Dwarf Fortress tilesets with minimum loss of quality.
Octave is a high-level interpreted language, primarily intended for numerical computations and is a free alternative to MATLAB.

Octave is required to use Tileset Resizer and is available for Windows, Mac, and Linux.
The Image package from Octave Forge (http://octave.sourceforge.net/) is also required to to use Tileset Resizer.
hqx (http://code.google.com/p/hqx/) is required to use resize_tileset_hqx and resize_tileset_hqx_tilebytile.

The Windows executable installer is for Octave 3.4.3 and has been tested to work.
Octave 3.2.4 which is over a year old (current version is 3.4.x). The oct2mat package included in this installer has a bug which prevents Octave from reading image files.
-> Tileset Resizer functions now detect incompatible packages (oct2mat) and deactivate them automatically. <-
 
See the readme for detailed setup instructions.

Download
DFFD (http://dffd.wimbli.com/file.php?id=4542)



Experimental multithreading of resize_tileset_hqx_tilebytile has been added in v3.0 along with batch processing functions.
If you want to help by beta testing Tileset Resizer v3.0 the instructions for doing so are in this post (http://www.bay12forums.com/smf/index.php?topic=87196.msg2948923#msg2948923)
I still need someone to beta test v3.0 on a Mac before I can make a preliminary release.
The multithreading of resize_tileset_hqx_tilebytile does not work on Windows right now and won't unless someone can help me with it. (http://www.bay12forums.com/smf/index.php?topic=87196.msg3017249#msg3017249)
As of now multithreading should work in any linux distro but has only been tested in Ubuntu 11.04 for now.



Tileset Resizer allows the use of several more methods to resize tilesets to fit your monitor than are available in Dwarf Fortress.
Four different resizing methods are included in Tileset Resizer.  Each is run by calling a different function in Octave.

1. resize_tileset is the simplest and fastest resizing function, but it produces the most errors when resizing.  It resizes the whole tileset at once.
2. resize_tileset_tilebytile breaks the tileset up into its individual tiles and resizes them individually before recombining them again.  This is slower than resize_tileset but produces better results.
3. resize_tileset_hqx resizes the tileset using the hqx resizing algorithm.  The results of this resizing method are significantly different than those from resize_tileset. This method resizes the whole tileset at once.
4. resize_tileset_hqx_tilebytile breaks the tileset up into its individual tiles and resizes them individually with the hqx resizing algorithm before recombining them again.  This function is significantly slower than the others.

resize_tileset_hqx and resize_tileset_hqx_tilebytile use the hqx resizing algorithm which was written to upsize pixel art.


Notes

All Tileset Resizer functions can now resize RGB images as well as RGB+Alpha images. resize_tileset and resize_tileset_tilebytile also support grayscale images.

Dwarf Fortress enforces a hardcoded display of a minimum of 80 tiles in the horizontal direction.
Because of this the maximum tile size (in pixels) that can be displayed on a monitor is calculated the following way.

Maximum Tile Size = (Monitor Horizontal Resolution In Pixels)/80
See Reply 10 (http://www.bay12forums.com/smf/index.php?topic=87196.msg2582949#msg2582949) for more information. 


Example Results

Ironhand 0.57 (http://www.bay12forums.com/smf/index.php?topic=53180.0)
Original 18x18 Tiles
Spoiler (click to show/hide)
Resize To 24x24 Tiles With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Phoebus 0.31.25v23 (http://www.bay12forums.com/smf/index.php?topic=57557.0)
Original 16x16 Tiles
Spoiler (click to show/hide)
Resize To 24x24 Tiles With resize_tileset interp='nearest'
Spoiler (click to show/hide)
Resize To 24x24 Tiles With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize To 24x24 Tiles With resize_tileset_hqx interp='spline'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)
Resize to 45x45 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Phoebus 0.31.25v23 Beefmo Unit Dwarves (http://www.bay12forums.com/smf/index.php?topic=57557.0)
Original 16x16 Tiles
Spoiler (click to show/hide)
Resize To 24x24 Tiles With resize_tileset interp='nearest'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx interp='spline'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)
Resize to 45x45 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Mayday v31_25_a (http://www.bay12forums.com/smf/index.php?topic=53649.0)
Original 16x16 Tiles
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Mayday v31_25_e (http://www.bay12forums.com/smf/index.php?topic=53649.0)
Original 16x16 Tiles
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

yokomeshi 12x12 tileset (http://www.bay12forums.com/smf/index.php?topic=88598.0)
Original 12x12 Tiles
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset interp='nearest'
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_hqx interp='spline'
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Vherid Tileset/Colorscheme (ASCII+) (http://www.bay12forums.com/smf/index.php?topic=89856.15)
Original 12x12 Tiles
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_tilebytile interp='nearest'
Spoiler (click to show/hide)
Resize To 24x24 With resize_tileset_hqx_tilebytile interp='spline'
Spoiler (click to show/hide)

Interpolation Methods & Final Sizes Comparison
Follow Link and Click Download Image to See Fullsize Due to Extreme Image Size
resize_tileset (http://sta.sh/0emmpjnaaqe)
resize_tileset_tilebytile (http://sta.sh/0d0skljlidl)
resize_tileset_hqx (http://sta.sh/08nfgkkvx5o)
resize_tileset_hqx_tilebytile (http://sta.sh/018a2xtekmg5)

Screenshots
!!Warning Very Large Images!!
Phoebus 0.31.25v23 With Beefmo Units Original Size (16x16)
Spoiler (click to show/hide)
Phoebus 0.31.25v23 With Beefmo Units Resized to 24x24 Tiles With resize_tileset interp='nearest' (v2.5)
Spoiler (click to show/hide)
Phoebus 0.31.25v23 With Beefmo Units Resized to 24x24 Tiles With resize_tileset_tilebytile interp='nearest' (v2.5)
Spoiler (click to show/hide)
Phoebus 0.31.25v23 With Beefmo Units Resized to 24x24 Tiles With resize_tileset_hqx interp='spline' (v2.5)
Spoiler (click to show/hide)
Phoebus 0.31.25v23 With Beefmo Units Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)
Phoebus 0.31.25v23 With Beefmo Units Resized to 20x20 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)
Phoebus 0.31.25v22 With Beefmo Units Resized to 45x45 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.0)
Spoiler (click to show/hide)

Ironhand 0.57 Original Size (18x18)
Spoiler (click to show/hide)
Ironhand 0.57 Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)

Mayday v31_25_a Original Size (16x16)
Spoiler (click to show/hide)
Mayday v31_25_a Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)
Mayday v31_25_a Resized to 24x24 Tiles With delete_bg_color R=255 G=0 B=255 then resize_tileset_hqx_tilebytile interp='spline' (v3.0 Preview)
Spoiler (click to show/hide)

Mayday v31_25_e Original Size (16x16)
Spoiler (click to show/hide)
Mayday v31_25_e Resized to 24x24 Tiles With resize_tileset_tilebytile interp='nearest' (v2.5)
Spoiler (click to show/hide)
Mayday v31_25_e Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)

yokomeshi 12x12 tileset Original Size (12x12)
Spoiler (click to show/hide)
yokomeshi 12x12 tileset Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)
yokomeshi 12x12 tileset Resized to 24x24 Tiles With delete_bg_color R=255 G=0 B=255 then resize_tileset_hqx_tilebytile interp='spline' (v3.0 Preview)
Spoiler (click to show/hide)

Vherid Tileset/Colorscheme (ASCII+) Original Size (12x12)
Spoiler (click to show/hide)
Vherid Tileset/Colorscheme (ASCII+) Resized to 24x24 Tiles With resize_tileset_hqx_tilebytile interp='spline' (v2.5)
Spoiler (click to show/hide)
Vherid Tileset/Colorscheme (ASCII+) Resized to 24x24 Tiles With delete_bg_color R=255 G=0 B=255 then resize_tileset_hqx_tilebytile interp='spline' (v3.0 Preview)
Spoiler (click to show/hide)

Using Tileset Resizer
Instructions on how to use Tileset Resizer are found in the readme below and in the download.

Readme
Spoiler (click to show/hide)

Changelog
Spoiler (click to show/hide)
Title: Re: Tileset Resizer v1.0 Resize Tilesets For Larger or Smaller Monitors
Post by: arclance on June 20, 2011, 08:13:45 pm
Important Information For Windows Users
The Windows executable installer is for Octave 3.2.4 which is over a year old (current version is 3.4.x). The oct2mat package included in this installer has a bug which prevents Octave from reading image files.
To use tileset resizer either install the newest version of oct2mat from Octave Forge or run "pkg unload oct2mat" before using tileset resizer.

This is the error mesage you will see if your version of Octave suffers from this bug (or if you have specified the wrong filename or the file you are trying to open is not in the directroy you are in).
Quote
octave-3.2.4.exe:2> resize_tileset('Phoebus_16x16','png',16,16,45,45)
error: imread: cannot find Phoebus_16x16.png
error: called from:
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\image\imread.m at line 53, column 5
Octave can be compiled from source for Windows but there are no instructions on how to do this for the current release that I know of.
If anyone knows how to compile Octave in windows and can explain how to do it I would appreciate it if you would tell us about it.

I do not know if this will affect the Mac version or not.
Since I do not have access to a Mac I can not check this.

Also some higher end image editing software (ex. Photoshop) can resize using the same method a resize_tileset. 
If you have this type of software already check if it has an option to choose a different interpolation method when resizing a image.
If it does check for a setting of nearest or nearest neighbor. 
If the program has this setting you can resize tilesets in the same way as Tileset Resizer using this setting as long as your image editor respects the alpha layer when resizing. 

If your image editing software does not have this interpolation option it will distort (mostly blur) the tileset when resizing.

This interpolation method takes advantage of the blocky nature of pixel art to resize the image without distorting it because this method does not distort sharp corners (and pixel art is all sharp corners).

edit: solution for windows version found
Title: Re: Tileset Resizer v1.1 Resize Tilesets For Larger or Smaller Monitors
Post by: arclance on June 21, 2011, 01:47:53 pm
Update v1.1
Modified imresize and imremap to handle 4 channel images instead of 3 channel images, now processes whole image at once instead of each layer individualy.
imresize and imremap modification reduces distortion of images when resizeing by using relationships between layers to improve the interpolation result.
This is a simple rewrite and breakes support for 3 channel images, if 3 channel support is needed I will do a more extensive rewrite.

Would there be any interest in a version of Tileset Resizer where you input your monitors horizontal resolution and it resizes the tileset to the maximum tilesize for that resolution?
If there is I could easily make one.

Sample images for Phoebus 0.31.25v21 resized to 45x45 tiles (3600 pixel horizontal resolution)
Tileset Resizer v1.0
Spoiler (click to show/hide)

Tileset Resizer v1.1
Spoiler (click to show/hide)

Photoshop CS4 Resized With Nearest Neighbor Interpolation Option
Spoiler (click to show/hide)

Screenshots with Phoebus 0.31.25v21 and Beefmo Units resized to 45x45 tiles (3600 pixel horizontal resolution)
Coming Soon.
Title: Re: Tileset Resizer v1.1 Resize Tilesets For Larger or Smaller Monitors
Post by: Quarynn on June 22, 2011, 07:57:11 am
I'd rather use Paint.NET or Photoshop with Nearest Neighbor option, as this program sets pixel block heights and widths different on some places
Title: Re: Tileset Resizer v1.1 Resize Tilesets For Larger or Smaller Monitors
Post by: Ethicalfive on June 22, 2011, 10:36:54 am
I like it. Shame my screen only supports 16x16 tilesets. Go tell toady to go change the minimum 80 width thing so I can enjoy larger tiles! Blarge, I have having to press my face up against the screen to enjoy pheobus n ironhands sets.

Also I noticed that your ingame screenshots all look the same size to me. Only difference I can see is bitshifted issues with the 45x45 screenshot.
Title: Re: Tileset Resizer v1.1 Resize Tilesets For Larger or Smaller Monitors
Post by: Quarynn on June 22, 2011, 11:02:48 am
Well, also the reason that 45x45 won't show up correctly in any resizing is that it's not a force of 2 (1,2,4,8,16..)
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: arclance on July 04, 2011, 08:23:59 pm
Update v2.0
resize_tileset now allows the user to select the interpolation method.
added resize_tileset_tilebytile -- breaks the tileset up into its individual tiles and resizes them individually before recombining them again.
added resize_tileset_hqx -- resizes the tileset using the hqx resizing algorithm.  Requires download of hqx.
added resize_tileset_hqx_tilebytile -- breaks the tileset up into its individual tiles and resizes them individually with the hqx resizing algorithm before recombining them again.  Requires download of hqx.

Because hqx can not resize images with a alpha channel resize_tileset_hqx and resize_tileset_hqx_tilebytile split the image to its rgb and alpha channels and saves them to be resized by hqx.
These resized images are recombined after resizing. Because hqx can only resize images to 2x, 3x, or 4x size the recombined image is then downsized to the desired final size using a user specified interpolation method.
A picture illustrating this process is shown below.
Spoiler (click to show/hide)

Sample results and screenshots for the new version are in the original post.

The reason that the windows installer version of Octave was not working has been discovered.
The oct2mat package included in this installer has a bug which prevents Octave from reading image files.
To use Tileset Resizer either install the newest version of oct2mat from Octave Forge or run "pkg unload oct2mat" before using tileset resizer.

I'd rather use Paint.NET or Photoshop with Nearest Neighbor option, as this program sets pixel block heights and widths different on some places
Only difference I can see is bitshifted issues with the 45x45 screenshot.
I found that this was caused by pixes from neighboring tiles being used in the interpolation of the resized tile.
The screenshot for resize_tileset_hqx exhibits this problem.
resize_tileset_tilebytile and resize_tileset_hqx_tilebytile include corrections for these issues.
These two functions break the tileset up into individual tiles and then resizes them before recombining them back into the whole tileset.
This prevents pixels from neighboring tiles from being used in interpolating the resized tile.
However this makes the resizing take longer. 
Significantly longer in the case of resize_tileset_hqx_tilebytile which takes approximately 10 minutes to resize a 16x16 (in tiles) tileset while resize_tileset_hqx takes approximately 4 seconds.
resize_tileset_hqx_tilebytile takes approximatlely 125 times longer than resize_tileset_hqx.
This is because octave has to make 16*16*2=512 calles to hqx in the resizing operation for resize_tileset_hqx_tilebytile and 2 calls to hqx for resize_tileset_hqx.
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: Cave Man on July 28, 2011, 01:30:56 am
I can`t run this programs? because Octavia can`t find our files :(
Tell about installation step by step, please:
1 download hqx-1.0-mingw-win32-bin.zip, Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe, Tileset_Resizer_v2.0_arclance
2 extract hqx-1.0-mingw-win32-bin.zip and Tileset_Resizer_v2.0_arclance to...
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: arclance on July 28, 2011, 12:13:54 pm
Did you read the readme? Installation and use instructions are in there.

You can extract Tileset_Resizer_v2.0_arclance anywhere.  Extract hqx-1.0-mingw-32-bin.zip inside the windows folder found in the Tileset_Resizer_v2.0_arclance folder that was made when you extracted Tileset_Resizer_v2.0_arclance.

Since you are using the windows installer version you should remember this when using octave if you installed all the packages that are in the installer.
The oct2mat package included in this installer has a bug which prevents Octave from reading image files.
To use Tileset Resizer either install the newest version of oct2mat from Octave Forge or run "pkg unload oct2mat" before using tileset resizer.
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: Xen0n on August 31, 2011, 06:27:41 pm
Hi sorry to bring up an old post.  I really appreciate what you've done here, and have no problems about your handy tool.  Rather, I think I have a problem with implementing it? 

It does in fact resize my tileset to the correct size, and upon installing the newly edited graphics set (and updating savegames), upon initially running DF in window mode the window starts up huge (spilling off my desktop). The tiles I can see in the window are big too, exactly how I want them.  But the moment I click on the window, resize it, move it, enter fullscreen mode (or start in fullscreen mode), all the tiles go back to their standard super tiny sizes, the same size as for any tileset I download and install, and the same physical size on my screen no matter what I change my monitor resolution to / what I eneter as the resolution / grid size in the init file.

Am I missing some critical step to getting the embiggened tilesets to work properly, or am I just screwed?  I wanna use a graphics pack, but seem stuck with ASCII since it's the only way I can find that will let me zoom in enough to actually read things (typically play on a 1280 x 720 monitor)
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: arclance on September 01, 2011, 04:09:57 pm
It does in fact resize my tileset to the correct size, and upon installing the newly edited graphics set (and updating savegames), upon initially running DF in window mode the window starts up huge (spilling off my desktop). The tiles I can see in the window are big too, exactly how I want them.  But the moment I click on the window, resize it, move it, enter fullscreen mode (or start in fullscreen mode), all the tiles go back to their standard super tiny sizes, the same size as for any tileset I download and install, and the same physical size on my screen no matter what I change my monitor resolution to / what I eneter as the resolution / grid size in the init file.

Am I missing some critical step to getting the embiggened tilesets to work properly, or am I just screwed?  I wanna use a graphics pack, but seem stuck with ASCII since it's the only way I can find that will let me zoom in enough to actually read things (typically play on a 1280 x 720 monitor)

Dwarf Fortress enforces a hardcoded display of a minimum of 80 tiles in the horizontal direction. 
Because of this the maximum tile size (in pixels) that can be displayed on a monitor can be calculated the following way.

Maximum Tile Size = (Monitor Horizontal Resolution In Pixels)/80

For your 1280x720 laptop this equation gives
1280/80 = 16
so the largest square tiles that can be displayed on your monitor are 16x16 tiles.
If you try to use a tileset with larger tiles than 16x16 on a 1280x720 monitor (ex. 24x24) dwarf fortress will downsize the tileset to conform to the 80 tile limit.

Tilset Resizer reports the minimum horizontal resolution needed to use the resized tileset that is produced using the following equation

min_resolution = tile_x_size*80

This result is printed in the terminal output just before the resized tileset is saved and is included in the filename so it can be checked later.  An example filename is below.
hexed_12x12_hqx_tilebytile_spline_tileset_dimensions_16x16_tile_size_24x24_tileset_size_384x384_minimum_horizontal_resolution_1920.png
For a tile size of tile_x_size of 16 the equation gives a min_resoultion of 1280, for a tile_x_size of 24 it gives a min_resolution of 1920.

Most tilesets have 16x16 pixel or larger tiles to start with.  The first post has some example tilesets with there original tilesize given. 
An exeption is yokomeshi's 12x12 tileset (http://www.bay12forums.com/smf/index.php?topic=88598.0) which I find quite usable on my 1280x720 laptop.
Title: Re: Tileset Resizer v2.0 Resize Tilesets - Now With hqx
Post by: Xen0n on September 01, 2011, 05:23:08 pm
Thanks for the very informative reply!  After reading it I got suspicious, did some checking, and discovered that in actuality I was getting exactly 80 tiles along the horizontal axis with both ASCII and graphics sets, but the ASCII just appeared to be larger due to less detail and increased readability/clarity from a distance.

To sum up, I can't tell how big things are by looking at them, and everything was working fine.  Since that 80 tile limit is hardcoded, only thing left is to move the monitor closer :P

Thanks again!
Title: Re: Tileset Resizer v2.5 Resize Tilesets - Now With hqx
Post by: arclance on September 02, 2011, 02:38:47 pm
Update v2.5
All Tileset Resizer functions now detect known incompatible Octave Forge packages (oct2mat) and deactivates them with the "pkg unload package_name" command.
All Tileset Resizer functions now check if required Octave Forge packages (image) are installed and if they are activated. 
If they are not installed and error message is displayed.  If the packages are not activated they are activated automatically with the "pkg load package_name" command.
Warning messages are given if a package is loaded or unloaded.
imresize and imremap updated to be able to resize RGB, RGB+Alpha, and grayscale images.
All Tileset Resizer functions can now resize RGB images as well as RGB+Alpha images. resize_tileset and resize_tileset_tilebytile also support grayscale images.
resize_tileset_hqx_tilebytile now includes workarounds for bugs in imread that appear when reading small image files (like individual tiles).
resize_tileset_hqx_tilebytile rewritten to be easier to modify and to check for incorrect user inputs before anything else.
All Tileset Resizer functions now save resized tilesets in the same filetype as the original image.

Added RGB tileset examples (Vherid and yokomeshi).
Updated examples to v2.5.  Screenshots updates will come in the next few days.

DFFD upload is not working, stuck at zero percent uploaded.  Use the mediafire (http://www.mediafire.com/file/b2b6n1nxjo8zryj/Tileset_Resizer_v2.5_arclance.zip) backup link for now.
DFFD upload successful.
Title: Re: Tileset Resizer v2.5 Resize Tilesets - Now With hqx ->Batch Files Eventually
Post by: arclance on September 05, 2011, 06:34:12 pm
Version 3.0 Progress Update
Discovered this problem that occurs when resizing RGB images (happens in RGB+Alpha also but the alpha layer completely hides it).
Resizing RGB images with backround colors leaves slightly different colors than the background around the tile subject.
This is due to the way interpolation works in resizing images and is unavoidable.  Alpha layer masks hide this problem in RGB+Alpha images by masking out the pink outline so it is not shown.
Spoiler (click to show/hide)
Spoiler (click to show/hide)
A fix for this wil be released with v3.0. Initial results are shown below.
Spoiler (click to show/hide)
Spoiler (click to show/hide)
Support for grayscale images will be added to resize_tileset_hqx and resize_tileset_hqx_tilebytile in v3.0.
Batch files to process every image of the specified type in the current working directory will be included in v3.0.
Batch processing requires a slight change to the way the resizing functions are called in Octave.
Usage instructions must be rewritten to reflect these changes before v3.0 is released.

Screenshots are almost completely updated.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on January 30, 2012, 03:52:04 pm
Version 3.0 Progress Update 2 - Beta Testers Needed
I did not have as much time as I thought I would when I last posted about an update here. 
I had some free time recently so here is a update of my progress to the next version.

Resizing RGB images with backround colors leaves slightly different colors than the background around the tile subject. - done
Support for grayscale images will be added to resize_tileset_hqx and resize_tileset_hqx_tilebytile in v3.0. - done
Batch files to process every image of the specified type in the current working directory will be included in v3.0. - done
Batch processing requires a slight change to the way the resizing functions are called in Octave. - done
Usage instructions must be rewritten to reflect these changes before v3.0 is released. - will do after beta testing

                                     New
Adding multithreading to resize_tileset_hqx_tilebytile
I am seeing up to 2.8x faster processing on a hyperthreaded quad core using 8 threads and 1.8x faster processing using 2 threads.
The MT version is experimental and I need beta testers for all operating systems before I can make a full release, especially Windows and Mac as the mutithreading method (http://octave.sourceforge.net/general/function/parcellfun.html) may not work correctly on those operating systems.
If anyone wants to help with the beta testing post here and I will tell you what to do.

First Post Updates
Added v3.0 Preview Screenshots
Added Mayday v31_25_e Screenshots/Resizing Examples
Added Comparison samples for the results of using the different interpolation methods available in Octave for each Tileset Resizer function for several final tile sizes
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: nukularpower on January 30, 2012, 05:01:30 pm
Will definately give this a try later.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on January 31, 2012, 12:39:39 pm
Will definately give this a try later.
I hope you like it.
If you are making larger tiles would you like to beta test the multithreaded version of resize_tileset_hqx_tilebytile?
It is significantly faster than the old version but I need some people to test it on various systems before I make a public release.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: Ghills on January 31, 2012, 07:36:30 pm
I'd be happy to beta-test.  You can PM me about arrangements, or we can talk in this thread.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on January 31, 2012, 09:03:48 pm
I'd be happy to beta-test.  You can PM me about arrangements, or we can talk in this thread.
Why don't we talk here.  I just don't want to put the beta up on DFFD until it's tested.

Tileset Resizer v3.0 Beta - Instructions (Beta)

First I need to know some information about your computer for beta testing.

1. What Operating System are you using?
2. How many cores/threads does you processor have?
3. What version of Octave are you using?
4. What version of hqx are you using (1.0 or 1.1)?
5. What tileset are you resizing (so I know what to test with to try and reproduce problems)?

When you use Tileset Resizer I need you to do two things for me.
1. The Beta version outputs some debugging information in Octave, please copy and paste the Octave output here even if you don't have any problems so I can see how well it works for you.
2. If you do run into a problem tell me and I will give you a version with full debug output to try.  It has a lot of terminal output so I don't want to start with that version because it makes it slower.

You will need Octave (https://www.gnu.org/software/octave/), hqx (https://code.google.com/p/hqx/), and from Octave Forge the image (http://octave.sourceforge.net/image/index.html) and general (http://octave.sourceforge.net/general/) packages.
If you use Window or Mac operating systems you can get installers for Octave at Octave Forge. (http://octave.sourceforge.net/)
Follow the instructions in the readme in the first post on how to install them, the general package is new and installs the same way as the image package.

----Download Tileset Resizer v3.0-Beta Here---- (http://dl.dropbox.com/u/69178231/Tileset_Resizer_v3.0-Beta_arclance.zip)

Here are some instructions for using the new features in v3.0.  I haven't written the readme yet so if these don't make sense just ask me for help.
--NOTE--
The functions still have their development filenames (so I can tell the versions apart) so they will need to be called by those names in octave.
Mostly this means that the old functions have a "2" on the end (for now) to indicate the can be called by the batch processing functions.

resize_tileset_hqx_tilebytile2_split_MT_Beta is the multithreaded version of resize_tileset_hqx_tilebytile
a new input variable has been added to resize_tileset_hqx_tilebytile2_Split_MT_Beta to specify how many threads to use.
This is the last input variable given.

Valid inputs are
Code: [Select]
-1 = multithreading disabled
0 = try to automatically choose a sane number of threads to use
1 to number of hardware threads = this many threads will be used
Use of more threads than hardware threads is disabled right now as it most likely will be slower and more buggy.

Here is an example of a correct call of the function.
Code: [Select]
resize_tileset_hqx_tilebytile2_split_MT_Beta('Phoebus_16x16','png',16,16,24,24,'spline',0)
resize_tileset_hqx_tilebytile2 is the old version with some improvements and bug fixes

The other three previous function have added improvements and bug fixes but but are otherwise the same.

New Functions
delete_bg_color2
Replaces a specified rgb color in an image file with black and adds/edits the alpha layer to make pixels of the specified color transparent.
Only png and bmp files are valid for Dwarf_Fortress but tiff files also support an alpha layer.
Solves the bug from this post (http://www.bay12forums.com/smf/index.php?topic=87196.msg2592247#msg2592247)
The standard purple/magenta background seen in tilesets is R=255 G=0 B=255.

Here is an example of a correct call of the function.
Code: [Select]
delete_bg_color2('hexed_12x12','bmp',255,0,255)
delte_bg_color_batch
Batch processes all files of the specified type using delete_bg_color2
Only png and bmp files are valid for Dwarf_Fortress but tiff files also support an alpha layer.

Here is an example of a correct call of the function.
Code: [Select]
delete_bg_color_batch('bmp',255,0,255)
tileset_resizer_batch
Batch process all image files of the specified file type with the specified Tileset Resizer Function with given inputs.
All tilesets being process must have the same original tilesize.

These are the defined inputs
Code: [Select]
tileset_resizer_batch(file_type,x_tile,y_tile,tile_x_size,tile_y_size,interp,fun_sel,mt_select=-1)And their definitions
Code: [Select]
# file_type is the file type to process
# x_tile is the width of a single tile measured in pixels
# y_tile is the height of a single tile measured in pixels
# tile_x_size = width in pixels to resize the tiles to. ex. 24
# tile_y_size = height in pixels to resize the tiles to. ex. 24
# interp can be ('nearest','linear','bilinear','cubic','bicubic','pchip','spline') spline, cubic, or bicubic should give the best results for hqx functions, nearest is recomened for the other two functions
# fun_sel selects which tileset resizer function to use 1 = resize_tileset, 2 = resize_tileset_tilebytile, 3 = resize_tileset_hqx, 4 = resize_tileset_hqx_tilebytile
# mt_select determines if multithreading will be used for resize_tileset_hqx_tilebytile (-1 to not use multithreading), if it is used it determines how many thereads to use

Here is an example of a correct call of the function for a tileset that started with 16 pixel by 16 pixel tiles to resize them to 24 pixel to 24 pixel tiles.
Code: [Select]
tileset_resizer_batch('png',16,16,24,24,'spline',4,0)All tilesets to be processed at the same time must have the same pixel dimension tiles (all 16 pixel by 16 pixel tiles).
tileset_resizer_batch can process tilesets with different tile dimensions (ex. the standard 16x16 grid tileset and a say 12x36 creature tileset both with 16 pixel by 16 pixel tiles).

Update: Windows users -- Multithreading Does Not Work In Windows --
Multithreading does not works on Windows machines due to pipe not working (breaks the multithreading kludge that is used to get around octaves single threadedness).
Calls should be made like this to instruct Tileset Resizer to use the single threaded version of resize_tileset_hqx_tilebytile.
Code: [Select]
resize_tileset_hqx_tilebytile2_split_MT_Beta('Phoebus_16x16','png',16,16,24,24,'spline')
Code: [Select]
tileset_resizer_batch('png',16,16,24,24,'spline',4)
I can't fix this myself as I did not write the multithreading framework I am using (parcellfun() from the general package from Octave Forge) and it is what is broken on Windows.
If anyone know how to fix the problem let me know and I will see what I can do to make it work on Windows.
More information can be found in this post. (http://www.bay12forums.com/smf/index.php?topic=87196.msg3017249#msg3017249)

All other functions are not called directly by the user so they do not require instructions.

If you have any questions just ask me.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: Ghills on February 01, 2012, 10:04:42 pm
Well, I can test on Vista and Windows 7 (I'm upgrading in the near future).

Processor is has at least two threads - I've misplaced the spec sheet, I'll find it sometime this week.

I'd try resizing all the major tilesets, plus whatever I happen to have lying around.  So Phoebus, Ironhand, Mayday and then I have a couple others I thought were nifty, I'll get their names up here also.

I need to install Octave and hqx, I'll probably run the latest version of both unless there's some special reason not to.  Will the finished package install them for the end-user?

I'm going to be busy this week, but I'll run a test this weekend and post the results here.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on February 04, 2012, 05:50:37 pm
Well, I can test on Vista and Windows 7 (I'm upgrading in the near future).

Processor is has at least two threads - I've misplaced the spec sheet, I'll find it sometime this week.

I'd try resizing all the major tilesets, plus whatever I happen to have lying around.  So Phoebus, Ironhand, Mayday and then I have a couple others I thought were nifty, I'll get their names up here also.
Sounds good too me.  I have not had time to test the v3.0 changes in Windows yet so this will be very helpful.
I'm glad you will try multiple tilesets, most of the bugs I found myself only affect certain types of images so they more tilesets you try the better a test it will be.

I need to install Octave and hqx, I'll probably run the latest version of both unless there's some special reason not to.  Will the finished package install them for the end-user?

I'm going to be busy this week, but I'll run a test this weekend and post the results here.
I would always use the latest version of Octave, new versions usually only add features and fix bugs so they don't break scripts written for older versions.
The finished package will not install anything for the end-user that is outside the scope of this project.
It is not feasible to do that for Linux or Mac due the number of Different types of Linux available and my lack of a Mac to test anything on.
Executable installers/pre-compiled versions of Octave and hqx are available for Windows (though the Octave installer does not get updated as often as I would like).
The Octave executable installer for Windows will allow you to select which Octave-Forge packages included in the installer you would like to install.  You can install or update the packages later if you don't use the installer.
Instructions for installing the required programs have always been included in the readme for Windows, Mac, and Linux.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on February 08, 2012, 03:16:57 pm
I'm going to be busy this week, but I'll run a test this weekend and post the results here.
Did you have a chance to run anything over the weekend?
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: Flobulon on February 20, 2012, 12:12:23 pm
Hey arclance,
I've sent you a PM, just posting here in case you don't see it.
I'll be happy to do any other testing you require! :)
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Beta Testers Needed
Post by: arclance on February 21, 2012, 01:19:39 pm
Tileset Resizer v3.0 Beta Results -- Windows --
Flobulon has tested the v3.0 beta on Windows 7 and had the results show below
I tried the new multithread hqx tilebytile function, using the command
Code: [Select]
resize_tileset_hqx_tilebytile2_split_MT_Beta('Phoebus_16x16','png',16,16,24,24,'spline',0)Unfortunately I get the following:
Code: [Select]
octave:3> resize_tileset_hqx_tilebytile2_split_MT_Beta('Phoebus_16x16','png',16,16,24,24,'spline',0)
oct2mat_status = Not loaded
image_status = Loaded
general_status = Loaded
warning: your version of GraphicsMagick limits images to 16 bits per pixel
os = Windows
numProc =  8
tempDir = rgb_alpha
MF =  2
numUsed = Using 6 threads
error: failed to open pipe: pipe: not supported on this system
error: called from:
error:   C:\Octave\Octave3.4.3_gcc4.5.2\Octave3.4.3_gcc4.5.2\share\octave\packages\general-1.2.2\parcellfun.m at line 135, column 5
error:   C:\Users\[me]\Desktop\DwarfFortress\Tileset_Resizer_v3.0-Beta_arclance\resize_tileset_hqx_tilebytile2_split_M
T_Beta.m at line 208, column 1
I got my Windows Vista VM set up and was able to recreate the error.
Code: [Select]
error: failed to open pipe: pipe: not supported on this system
error: called from:
error:   C:\Octave\Octave3.4.3_gcc4.5.2\Octave3.4.3_gcc4.5.2\share\octave\packages\general-1.2.2\parcellfun.m at line 135, column 5
This error indicates that the multithreading function I am using, parcellfun() (http://octave.sourceforge.net/general/function/parcellfun.html) from the general package from Octave Forge (http://octave.sourceforge.net/ga/index.html), does not work in Windows.
parcellfun() works by starting more Octaves (one for each thread) to get around the single threaded nature of Octave and then controlling the new Octaves through pipe connections to the original Octave.
Each of the new Octaves runs the same function with a different set of input parameters and then waits for each thread to finish until continuing on in the original script.
Because pipe is not working in Windows the new Octave threads cannot be controlled by the original Octave so parcellfun() doesn't work.
If anyone know some other way to do this in Octave I would appreciate any help you can give me.

Everything else seems to work fine in Windows.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on March 26, 2012, 06:03:16 pm
I still need someone to test the v3.0 Beta on a mac so I can write up the readme for the new version.
I don't have admin privileges on any of the macs here so I can't install Octave to test it myself.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: Mazth on April 16, 2012, 10:44:05 pm
Thanks so much for this! Looks great on my 24", though the menu now also takes up a lot more space. Might see how other dims looks, using 24x24 now.
Used to zoom in with the mousewheel but my eyes got tired from looking at blurry graphics (or staring at the small tiles).
Tested the tileset first and the difference with the non modified graphicssets was very apparent. Was already used to hqx from emulators and I like the algorhythm.
Also interesting to learn a bit about Octave and the different interpolation methods.
In what language are your scripts written btw?

It appears you don't need win beta testing anymore, but if so, drop me a msg/pm.
(Everything went well with v2.5 on my ancient 1.8 AMD dualcore with octave 3.2.4 and 3.6.1 (forgot to load the libs so tried 3.2.4 first :S) apart from the somewhat long processing times)
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on April 17, 2012, 01:30:27 pm
Thanks so much for this! Looks great on my 24", though the menu now also takes up a lot more space. Might see how other dims looks, using 24x24 now.
Used to zoom in with the mousewheel but my eyes got tired from looking at blurry graphics (or staring at the small tiles).
Tested the tileset first and the difference with the non modified graphicssets was very apparent. Was already used to hqx from emulators and I like the algorhythm.
Also interesting to learn a bit about Octave and the different interpolation methods.
In what language are your scripts written btw?

It appears you don't need win beta testing anymore, but if so, drop me a msg/pm.
(Everything went well with v2.5 on my ancient 1.8 AMD dualcore with octave 3.2.4 and 3.6.1 (forgot to load the libs so tried 3.2.4 first :S) apart from the somewhat long processing times)
Thanks I'm glad you like it.
I use 20x20 tiles on my 37" tv,  it seems like a good compromise between larger tiles an increasing the size of the menu.

The scripts are written in Octave, which is intended as a open source replacement for Matlab so the languages are very similar.
I used Octave because it had a good image manipulation plugin available, though I had to fix it to work with rgba images and to use some interpolators that had been added to octave since it was written.
Octave's N-D matrices are also very easy to work with and are optimized which makes the script run faster.
hqx is run separate from octave since I don't know c/c++ well enough to completely understand the source code or have enough free time to re-write it as a octave function.

The script runs slower because it has to make so many calls to hqx so I improved this in the beta by multithreading that part of the script but it did not work on Windows.
I am waiting for someone to beta test that on a Mac so I can set up the scripts to only allow multithreading on operating systems where I know it works and so I can write the readme section on the new multithreading feature.

If you are processing the tileset and unit graphics you can download the beta version and use the batch processing scripts in there to make it go a little faster just be sure to not use the multithreading feature.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: Mazth on April 17, 2012, 02:39:13 pm
(...)
Thanks I'm glad you like it.
I use 20x20 tiles on my 37" tv,  it seems like a good compromise between larger tiles an increasing the size of the menu.

The scripts are written in Octave, which is intended as a open source replacement for Matlab so the languages are very similar.
I used Octave because it had a good image manipulation plugin available, though I had to fix it to work with rgba images and to use some interpolators that had been added to octave since it was written.
Octave's N-D matrices are also very easy to work with and are optimized which makes the script run faster.
hqx is run separate from octave since I don't know c/c++ well enough to completely understand the source code or have enough free time to re-write it as a octave function.

The script runs slower because it has to make so many calls to hqx so I improved this in the beta by multithreading that part of the script but it did not work on Windows.
I am waiting for someone to beta test that on a Mac so I can set up the scripts to only allow multithreading on operating systems where I know it works and so I can write the readme section on the new multithreading feature.

If you are processing the tileset and unit graphics you can download the beta version and use the batch processing scripts in there to make it go a little faster just be sure to not use the multithreading feature.
DF on my tv, excellent idea! My couch is very comfy ^^.
Don't have the menu open in general but when doing things it's a bit invasive; I'll try 20x20 tiles on the beta, the batch function will come in handy there.
Speed is not a big problem, I just run things while afk/playing, but clean and optimized code is always a pre. Too bad multithreading does not work on win, maybe time to switch to lunix :P

Does a run always yield the same result? And would you say spline works best with hqx or is it a bit trail and compare? I find it hard to see a lot of differences between it and your other recommendations (cubic/bicubic).

Thanks for the tips and explantions!

EDIT: I get this msg in Octave 'warning: your version of GraphicsMagick limits images to 16 bits per pixel', is this msg relevant or can it be ignored?
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on April 17, 2012, 03:25:37 pm
DF on my tv, excellent idea! My couch is very comfy ^^.
Don't have the menu open in general but when doing things it's a bit invasive; I'll try 20x20 tiles on the beta, the batch function will come in handy there.
Speed is not a big problem, I just run things while afk/playing, but clean and optimized code is always a pre. Too bad multithreading does not work on win, maybe time to switch to lunix :P
My tv is my main monitor, I bought one without fancy extra features, just a VGA hookup so I can have my computer do all the things a more expensive tv would do at a fraction of the price!
Does a run always yield the same result? And would you say spline works best with hqx or is it a bit trail and compare? I find it hard to see a lot of differences between it and your other recommendations (cubic/bicubic).

Thanks for the tips and explantions!
A run should always yield the same result unless there is something wrong with your computer causing data corruption.
Spline or bicubic should be the best options but which is best differs from image to image.
I put up a comparison between the interpolation options for resize_tileset_hqx_tilebytile here. (http://sta.sh/018a2xtekmg5)
Comparisons for the other functions can be found in the first post.
EDIT: I get this msg in Octave 'warning: your version of GraphicsMagick limits images to 16 bits per pixel', is this msg relevant or can it be ignored?
That message is just informing you of the limitations of the Graphics Magick that your version of Octave was built against.
It is telling you that you can work with up to 16 bit images.  Most images are 8 bit so you don't need to worry about it.
The warning runs a lot but there is no way to stop it.

There is a quality improvement (converting images to 16 bit before resizing and back to 8 bit before saving them) that I may try to put in the beta version for testing.
The only downside to this is that it increases the memory used by Octave when resizing the image
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on September 12, 2012, 04:51:12 pm
Since it has been awhile since I posted here I will post an update on the next version of Tileset Resizer.

Since hqx does not output 16bit images when given a 16bit input image the previously mentioned 16bit resizing trick will not work.

I still need someone to test the multithreaded version on a Mac before I can release the next version.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: DragonDePlatino on January 01, 2015, 01:48:12 pm
Have you considered adding support for the XBRZ algorithm (http://en.wikipedia.org/wiki/Image_scaling#xbr_family)?

(http://fc08.deviantart.net/fs70/f/2015/001/8/7/xbrz_dorf_by_dragondeplatino-d8c5flm.png)

HQX isn't meant to be used on pixel art. It's intended for resizing larger photos and such. On the other hand, XBRZ was created specifically for pixel art and works very well for it. Notice how when resizing to 4x, there are a lot of gray artifacts around HQX dwarf, but none on the XBRZ dwarf. There are also "stair-step" pixels on the HQX dwarf (look at the top of the arm) but none on the XBRZ dwarf. Also, when using using HQX, the algorithm won't smooth big blocks of color (eyes, mouth) while XBRZ will attempt to smooth those out a little bit. HQX even makes some really intelligent decisions, like bevelling the ends of the feet and turning the hands into perfect ovals.

The only downside to XBRZ is that I'm not sure if it supports alpha transparency...There's a MAME (http://sourceforge.net/projects/hqmame/files/xBRZ/) implementation of XBRZ out there and a Nintendo DS implementation (http://sourceforge.net/p/desmume/feature-requests/160/) with alpha transparency, but the standalone program (ScalerTest) I used to convert my example didn't support alpha transparency. Programming is an enigma to me so I wasn't able to look through the source code either.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on January 01, 2015, 02:12:47 pm
Have you considered adding support for the XBRZ algorithm (http://en.wikipedia.org/wiki/Image_scaling#xbr_family)?
No because I have never heard of it.
That is probably because it was released after I wrote Tileset Resizer.

Please post your original and scaled comparisons as separate images so I can evaluate them.
I need your original unmodified image to evaluate before making any comparisons at all.

(http://fc08.deviantart.net/fs70/f/2015/001/8/7/xbrz_dorf_by_dragondeplatino-d8c5flm.png)
HQX isn't meant to be used on pixel art. It's intended for resizing larger photos and such.
You are wrong HQX is meant for scaling pixel art, it is terrible for photos.
Quote from: HQX Project
hqx ("hq" stands for "high quality" and "x" stands for magnification) is one of the pixel art scaling algorithms developed by Maxim Stepin

The only downside to XBRZ is that I'm not sure if it supports alpha transparency.
HQX did not either when I started.
I have a workaround where you process the alpha layer separately and recombine them afterward if that is the case.
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: DragonDePlatino on January 01, 2015, 02:30:08 pm
Please post your original and scaled comparisons as separate images so I can evaluate them.
I need your original unmodified image to evaluate before making any comparisons at all.

Here's the original 24x24 dwarf: (http://fc07.deviantart.net/fs70/f/2015/001/a/5/dwarf_by_dragondeplatino-d8c5oav.png)

If you take that image and run it through ScalerTest (http://sourceforge.net/projects/hqmame/files/xBRZ/ScalerTest.zip/download), you can compare HQX, BRX and BRXZ at 2x, 3x and 4x resolutions. There's also a bunch of sliders like Color Tolerance that let you tweak your results.

You are wrong HQX is meant for scaling pixel art, it is terrible for photos.

Well, I suppose you're right. I've just never been particularly fond of HQX when it's applied to pixel art.

HQX did not either when I started.
I have a workaround where you process the alpha layer separately and recombine them afterward if that is the case.

Hey, that's great! If you find out how to resize images with BRXZ with alpha transparency, is there any way you could release a standalone executable with that implemented for 2x? Or is that not possible because all of this is being done in Octave?
Title: Re: Tileset Resizer v2.5 - Now With hqx -> v3.0 Mac Beta Testers Needed
Post by: arclance on January 01, 2015, 10:37:39 pm
Hey, that's great! If you find out how to resize images with BRXZ with alpha transparency, is there any way you could release a standalone executable with that implemented for 2x? Or is that not possible because all of this is being done in Octave?
It is all done in Octave.
I don't know the language BRXZ is written in so I could not even try do anything to it.