|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
PNG2Tile
Posted: Tue Jan 26, 2016 12:15 pm
|
Hi,
I'm a big fan of Maxim's Bmp2Tile app. But I do all my dev work on a mac. So I end up running a windows VM just to use bmp2tile. Doh! So... I decided to write a clone. Introducing PNG2Tile ;-) https://github.com/yuv422/png2tile It is a command line app written in C++ It should be feature compatible with BMP2Tile. (I've still got 8x16 support to complete and chunky tiles) I've added a feature to export the tilemap as an image. This was always a feature that I thought bmp2tile was lacking. I've also added the ability to export the tilemap in Tiled TMX format. :-) As I use Tiled for my map layouts. Anyway I hope you find this useful. Any feedback is greatly appreciated. I can also make binaries if anyone is interested. Regards, Eric |
|
|
Posted: Tue Jan 26, 2016 1:58 pm |
That's all good, since BMP2Tile is a bit of a product of my lack of coding ability at the time. I'm not sure what writing the tilemap image means - isn't that the input image?
The main feature for me now (apart from the obvious conversion and duplicate removal) is the compression plugin support, which is going to be hard to do on a Mac - so I had ideas about replacing it with some Python scripts for the compression (which can of course happen as a separate step anyway, but it's nice to do it all in one). |
|
|
Posted: Wed Jan 27, 2016 10:52 am |
Sorry I meant to say tileset. Take the input image and remove the dups then output the resulting tileset as another image. I can then feed this back into a mapeditor to build the actual game level. I'm also planning to compile in the compression plugin code. That was part of the reason why I wrote it in C++. :) |
|
|
Posted: Mon Feb 08, 2016 2:27 am |
Compiled for windows. Not sure of version so labeled 1.0. Very nice tool.
|
|
|
Posted: Fri Mar 11, 2016 8:33 am |
Compiled for Mac (10.9.5) as I needed it ;)
only output tiles as asm files ? (no bin ?) |
|
|
Posted: Fri Mar 11, 2016 10:28 am |
Hi ichigobankai, Yes only asm at this stage. I might go and add bin support at a later stage. At the moment I'm madly working on my comp entry. ;-) |
|
|
Posted: Fri Mar 11, 2016 10:55 am |
Me too ;)
and no problem, i've made a little python script to achieve this : "asm2bin". |
|
|
Posted: Tue Mar 29, 2016 12:58 am |
I'm going to use this, btw could anyone explain me what does this tile in the tile asset I created mean?:
; Tile index $057
.db $00 $FD $FF $FF $00 $5D $FF $FF $00 $FD $FF $FF $00 $79 $FF $FF $00 $E9 $FF $FF $00 $61 $FF $FF $00 $03 $FF $FF $00 $FE $FF $FF Thats because I want to switch pixels colours using the avaible palette asset I created. Thanks in advance |
|
|
Posted: Tue Mar 29, 2016 6:44 am |
Read this : http://www.smspower.org/maxim/HowToProgram/Tiles ;) | |
|
Posted: Tue Mar 29, 2016 7:11 am |
The tile data defines which palette index is used for each pixel, independently of the palette itself. There's rarely a need to look at the data after the PNG stage. | |
|
Posted: Wed Mar 30, 2016 12:46 am |
Thank you, I understand now that every pixel is a group of 4 bits to point out to one of the 16 palette colours available and I succesfully edited every pixel or tile I wanted. | |
|
libpng error: sequential row overflow
Posted: Tue Apr 12, 2016 7:02 pm
|
Hi,
I was experimenting with how png2tile outputs palette, but I get the libpng error stated in the subject line above. I try to process the attached image using this command "png2tile gargoyle.png -pal sms -savepalette MadeWithPng2Tile.pal" ?? |
|
|
Posted: Sun May 01, 2016 11:40 am |
Hi hang-on, Thanks for reporting this. I've finally gotten around to looking at it. I've just committed a fix. I wasn't handing the pixel expansion setting correctly for PNGs with a BPP < 8. It should be fixed now. :) Eric |
|
|
How to use it?
Posted: Sun Oct 24, 2021 4:58 pm
|
This is what happens when dragging a png file of a background I drew with the sms limitations in mind on the icon of this program.
What am I doing wrong? All I want to do is to convert it. Am I asking for too much?! |
|
|
Posted: Mon Oct 25, 2021 3:09 pm |
first launch the program. if it runs fine, you can load the image to convert. | |
|
It does not run fine.
Posted: Mon Oct 25, 2021 4:06 pm
|
It didn't run fine when I opened it normally. When I first extracted it from the archive and ran it, it kept saying that it needs some .dll files. After I downloaded the needed .dll files, it showed the message on the screenshot. |
|
|
Posted: Tue Oct 26, 2021 4:05 am |
You will need to use this app from the command line. I don't think it would support drag and drop. This reminds me that I should create a windows CI pipeline for this project on Appveyor. I might also see if I can get rid of the additional DLL dependencies and create a new release. :) |
|
|
impossible to use
Posted: Tue Oct 26, 2021 2:28 pm
|
I hope you will, because right now, this program is literally unusable. Even when opening it normally to type in the command shows that annoying message. |
|
|
PNG2Tile now with less dependencies
Posted: Fri Oct 29, 2021 10:16 am
|
Ok I've refactored the code and replaced libpng with LodePNG. So it shouldn't require any external DLLs now.
Could you give this version a go and see if it works? |
|
|
it doesn't work
Posted: Fri Oct 29, 2021 3:37 pm
|
No, it still doesn't. I tried opening it normally. |
|
|
Posted: Fri Oct 29, 2021 11:14 pm |
Sigh. That's no good. I tested it on a Windows 10 Home x64 machine and it worked ok. What version of Windows are you using? I'm a Mac user so I'm not really familiar with potential issues with current Windows systems. I used Appveyor to build this. Here's the build log. https://ci.appveyor.com/project/yuv422/png2tile |
|
|
Posted: Sat Oct 30, 2021 7:23 am |
MSVC builds need C runtimes installed, which should be the case on any modern Windows version. Dependency Walker is probably the next step to diagnose what’s up, but that can be hard to do remotely. | |
|
Posted: Sat Oct 30, 2021 9:06 am |
simply build statically |
|
|
Posted: Sat Oct 30, 2021 4:28 pm |
Version: Windows 10 Home Version: 20H2 Features: Windows Feature Experience Pack 120.2212.3920.0 |
|
|
Posted: Sun Oct 31, 2021 4:34 pm |
Worked on my Win10 professional. Exporting tilesets as png is great! |
|
|
How?!
Posted: Sun Oct 31, 2021 9:18 pm
|
How did you get it to work?! |
|
|
Posted: Mon Nov 01, 2021 3:04 am |
Just ran it from the command prompt. png2tile file.png -savetileimage tileset.png |
|
|
Posted: Mon Nov 01, 2021 8:15 am |
Alright. I'll try. |
|
|
Posted: Mon Nov 08, 2021 2:27 pm |
I made a .txt file, put the "png2tile file.png -savetileimage tileset.png" command in it, saved it as a .exe file (I assume that this what you meant by doing it through a command prompt), and when trying to run it, all that happened was a window that says that this application won't run on my computer. (even though I was using a similar program that worked in the exact same way, and it ran fine) |
|
|
Posted: Mon Nov 08, 2021 7:28 pm |
the text file should have a .bat extension, not .exe | |
|
Posted: Mon Nov 08, 2021 7:56 pm |
I still get this even when trying to run in a command prompt saved as a .bat file. |
|