NES Sprite Convertor/Viewer

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

haseeb_heaven
Posts: 20
Joined: Wed Mar 17, 2021 4:40 am
Contact:

NES Sprite Convertor/Viewer

Post by haseeb_heaven »

Hi all,
I have created an open source tool for converting sprites in PNG/BMP format to 8bit images so that it can be directly imported into the CHR files.
Tool also helps you convert multiple images to CHR files, and even crop part of images from Sprite sheet and import and for preview it uses YYCHR tool.

Here is preview of application.
Image

Some features.
* Allows you convert images(PNG/BMP) to 8Bit depth for NES.
* Allows you convert ROM Sprite Images aKa CHR files to PNG .
* Has ability to convert multiple and whole folder at once.
* Viewer allows you to view sprites and analyze bits/colors used.
* Lets you to crop images and directly import to CHR using YYCHR tool for preview.

Source code:
https://github.com/haseeb-heaven/NES-Sprite-Convertor

Sprites pack:
Sprite pack version 1.0: https://bit.ly/N3sSpRitz
Sprite pack version 2.0 : http://bit.ly/N3sPrTz2

Released:
Version 1.01
https://github.com/haseeb-heaven/NES-Sp ... s/tag/1.01
Version 1.02
https://github.com/haseeb-heaven/NES-Sp ... s/tag/1.02

Thanks if you found any bug or something then create new issue in Github page i will try to resolve it.
Attachments
NES-Sprite-Convertor_v1.02_bin.zip
NES-Sprite-Convertor_v1.02_bin
(3.94 MiB) Downloaded 424 times
Last edited by haseeb_heaven on Tue Mar 23, 2021 2:02 am, edited 4 times in total.
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

Wow, this tool seems to be just what I've been looking for! I've tried using other tools, but I can't use them (I have to either compile them or run them with Python, and I can never get those to work). I tried testing it with a 40x40 sprite I have, but I'm getting some errors.

First, I imported the image to the program just fine:
img1.png


But when I click on convert BMP/PNG, I get this error
img2.png
img2.png (2.64 KiB) Viewed 8294 times

I also tried the Import to CHR option and got this error:
img3.png
img3.png (3.2 KiB) Viewed 8294 times

I'm not sure what I'm doing wrong. I also set the output path to an existing folder, but that didn't seem to work.

And I couldn't figure out what's wrong from the error.log file:

Code: Select all

File: monster 6.png
Path: C:\MyFiles\Development\NES\Art\monster 6.png
haseeb_heaven
Posts: 20
Joined: Wed Mar 17, 2021 4:40 am
Contact:

Re: NES Sprite Convertor/Viewer

Post by haseeb_heaven »

zanto wrote: Sat Mar 20, 2021 5:03 pm Wow, this tool seems to be just what I've been looking for! I've tried using other tools, but I can't use them (I have to either compile them or run them with Python, and I can never get those to work). I tried testing it with a 40x40 sprite I have, but I'm getting some errors.

First, I imported the image to the program just fine:
img1.png



But when I click on convert BMP/PNG, I get this error
img2.png


I also tried the Import to CHR option and got this error:
img3.png


I'm not sure what I'm doing wrong. I also set the output path to an existing folder, but that didn't seem to work.

And I couldn't figure out what's wrong from the error.log file:

Code: Select all

File: monster 6.png
Path: C:\MyFiles\Development\NES\Art\monster 6.png
Thanks for trying out the tool. i have updated the tool to version 1.01 this issue is fixed now. Your file path should work now
Last edited by haseeb_heaven on Sun Mar 21, 2021 10:43 am, edited 1 time in total.
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: NES Sprite Convertor/Viewer

Post by Gilbert »

Hmmm. Since one of the messages suggested it may be path related, have you tried removing tbe spaces in the filename and see whether it works?
haseeb_heaven
Posts: 20
Joined: Wed Mar 17, 2021 4:40 am
Contact:

Re: NES Sprite Convertor/Viewer

Post by haseeb_heaven »

Gilbert wrote: Sun Mar 21, 2021 10:09 am Hmmm. Since one of the messages suggested it may be path related, have you tried removing tbe spaces in the filename and see whether it works?
Yes i have updated the application your path should not contain spaces "C:\Sprites\nes\Dev app"\Sprite 0.png" this kind of examples needs to be fixed i have addressed them in newer update.
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

I renamed the file to remove the space and got the same errors. Here's the output in the error.log. It also didn't work with version 1.01

Code: Select all

File: monster6.png
Path: C:\MyFiles\Development\NES\Art\monster6.png
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES Sprite Convertor/Viewer

Post by tepples »

zanto wrote: Sat Mar 20, 2021 5:03 pm Wow, this tool seems to be just what I've been looking for! I've tried using other tools, but I can't use them (I have to either compile them or run them with Python, and I can never get those to work).
In order to help me improve my tools and their documentation:
When you last tried to get Python to work, what error message did you get?
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: NES Sprite Convertor/Viewer

Post by tokumaru »

I can't speak for others, but what really bothers me about setting up development environments is how hard it is to setup portable versions of these environments these days...

The last time I tried to use Python, all instructions were about using installers, packet managers for extensions, and all this crap that's standard today that results in you not even knowing where the files go in your system and what else gets modified (e.g. environment variables).

Personally, I code all my tools in JavaScript for running with Node.js, which generally follows the same trends as Python does but still offers downloads that allow for the creation of portable environments without much hassle.

Is it possible to install Python and its extensions in a way that you can chose where all the files go and you can bring your whole setup to another machine in a thumb drive and have things just work without having to modify anything in that machine?
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

tepples wrote: Sun Mar 21, 2021 5:04 pm
zanto wrote: Sat Mar 20, 2021 5:03 pm Wow, this tool seems to be just what I've been looking for! I've tried using other tools, but I can't use them (I have to either compile them or run them with Python, and I can never get those to work).
In order to help me improve my tools and their documentation:
When you last tried to get Python to work, what error message did you get?
It's just the fact that I've never used Python in my life, so it makes things harder having to figure out how to do it import the modules and running the script. I did all those things, but I kept getting weird errors. I don't even think it's the tool's fault, I imagine if I tried harder I could get the tool to work. It's just a little overwhelming that to be able to use a tool, I have to go down another rabbit hole (the python environment and stuff), while trying to learn everything about NES development, which is a huge undertaking by itself :P

For example, when trying to run makechr (it comes with a bat to run it), I got this error

Code: Select all

C:\MyFiles\Development\NES\Utils\Graphics\makechr-master\bin>python ..\setup.py py2exe
Traceback (most recent call last):
  File "C:\MyFiles\Development\NES\Utils\Graphics\makechr-master\setup.py", line 12, in <module>
    import res_collector
  File "C:\MyFiles\Development\NES\Utils\Graphics\makechr-master\res_collector.py", line 4, in <module>
    from py2exe.build_exe import py2exe as build_exe
ImportError: cannot import name 'py2exe' from 'py2exe.build_exe' (C:\Users\Jose\AppData\Local\Programs\Python\Python39\lib\site-packages\py2exe\build_exe.py)
There was some other tool that I tried that uses Python, but I don't remember which one it was right now...

Maybe this would be trivial for someone who has any Python experience, which is not my case. I'd rather focus my energy and brain power on learning and working on the NES development and that's why a tool that is already compiled and ready to run is so appealing to me. I'm sorry if this sounds whiny. Again, I don't blame the tool, it's just that I'd rather find an easier option that works for me.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES Sprite Convertor/Viewer

Post by tepples »

Would you accept a tool that is already compiled for 64-bit Linux and ready to run on 64-bit Linux?
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

I use Windows, so I don't think I'd be able to make use of that. But I imagine it'd be helpful for people who use Linux
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NES Sprite Convertor/Viewer

Post by tepples »

Would it be forgivable/acceptable to release tools in the form of cross-compiled 64-bit Windows applications tested under Wine, not under Windows? Though tagged releases are tested on a Windows partition, interim builds are not, though they "should" run.

As for tokumaru's question:
WinPython provides a portable version of Python. Back when I still regularly used Windows and when MinGW was younger and simpler and smaller, I used to have a portable version of MinGW and the Allegro 4 library that I could put on a flash drive. I don't know how practical that is anymore.
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

tepples wrote: Sun Mar 21, 2021 8:06 pm Would it be forgivable/acceptable to release tools in the form of cross-compiled 64-bit Windows applications tested under Wine, not under Windows? Though tagged releases are tested on a Windows partition, interim builds are not, though they "should" run.
There's nothing to be forgiven about! I appreciate there are people working on tools to make devs lives easier, and I'm sorry if I sounded like I was angry or anything. If the tool can be run on Windows without having to be compiled, that would be very helpful. That'd definitely make it more accessible. But at the same time, I understand the hassle it is to do it whenever you update the tool and stuff.
haseeb_heaven
Posts: 20
Joined: Wed Mar 17, 2021 4:40 am
Contact:

Re: NES Sprite Convertor/Viewer

Post by haseeb_heaven »

zanto wrote: Sun Mar 21, 2021 3:08 pm I renamed the file to remove the space and got the same errors. Here's the output in the error.log. It also didn't work with version 1.01

Code: Select all

File: monster6.png
Path: C:\MyFiles\Development\NES\Art\monster6.png
I have fixed all path related issues now in version 1.02 check it now. :D
Make sure your Top level directory must not have whitespaces , inner sub directories can have whitespaces that will be okay.
User avatar
zanto
Posts: 57
Joined: Sun Mar 07, 2021 11:15 pm
Location: Rio de Janeiro, Brazil

Re: NES Sprite Convertor/Viewer

Post by zanto »

haseeb_heaven wrote: Mon Mar 22, 2021 3:15 am I have fixed all path related issues now in version 1.02 check it now. :D
Make sure your Top level directory must not have whitespaces , inner sub directories can have whitespaces that will be okay.
I downloaded version 1.02 and I still get the same errors. This path is okay, right? It has no whitespaces at all:

Code: Select all

File: monster6.png
Path: C:\MyFiles\Development\NES\Art\monster6.png
I wonder if there's some kind of restriction on the PNG file I'm supposed to use for the tool or something like that?
Post Reply