Recently I found out that convpng is having issues converting large amounts of images at once and has no official support anymore since convimg has been released. Left with no choice, I've tried to figure out how convimg's yaml file works. I've already tried to understand the readme but it still does not make sense how I'm suppose to convert an image into an appvar for a C program to access. On top of that, I need to add a header to each appvar but there's no mention of a header anywhere in the readme.
What I want to do is:
The yaml file will eventually be automatically created by a program I wrote so the program can come up with the unique header and appvar name. For now, I'm just trying to convert one image into an appvar.
The best I came up with was this: (Note every comment after // wasn't included in the yaml file when I executed convimg)
Code:
However, when I execute convimg I get the following messages:
Code:
I don't understand what these errors are here for, I only have 16 lines in my yaml file. I also don't understand why it couldn't open a file to write to? None of this makes sense to me, if there was an example yaml file on converting a single image to an appvar I feel like I could figure out the rest. Unfortunately, just going off the readme isn't enough information for me.
Fun fact: Even though the convpng repository was completely chagned, you can still find the convpng documentation on here.
What I want to do is:
- Create one custom palette for a group of images (potentially hundreds of images)
- Reserve index 0 and 255 for black and white respectively
- Convert that group of images (using the custom palette) to appvars for use in a C program
- The appvars must contain a header
- Each header in each appvar must be unique
- Each appvar name must be unique
The yaml file will eventually be automatically created by a program I wrote so the program can come up with the unique header and appvar name. For now, I'm just trying to convert one image into an appvar.
The best I came up with was this: (Note every comment after // wasn't included in the yaml file when I executed convimg)
Code:
//I tried to output the palette to be converted into an appvar later
output: c
include-file: gfx.h
palette: mypalette
fixed-color: {index:0, r:0, g:0, b:0}
fixed-color: {index:255, r:255, g:255, b:255}
speed: 1
images:
- Pup240C.png //automatic didn't work here even though this was the only .png file in the folder
//Here I tried to use the palette above to convert the image Pup240C.png
output: appvar
name: TESTAPPV
source-format: c
archived: true
palette: mypalette
convert: myimages
palette: mypalette
images:
- Pup240C.png
However, when I execute convimg I get the following messages:
Code:
[info] Reading file 'convimg.yaml'
[warning] Ignoring invalid line 25.
[warning] Ignoring invalid line 36.
[warning] Ignoring invalid line 38.
[warning] Ignoring invalid line 40.
[warning] Ignoring invalid line 42.
[info] Generating palette 'mypalette'
[info] - Reading 'Pup240C.png'
[info] - Writing ''
[error] Could not open file: Invalid argument
I don't understand what these errors are here for, I only have 16 lines in my yaml file. I also don't understand why it couldn't open a file to write to? None of this makes sense to me, if there was an example yaml file on converting a single image to an appvar I feel like I could figure out the rest. Unfortunately, just going off the readme isn't enough information for me.
Fun fact: Even though the convpng repository was completely chagned, you can still find the convpng documentation on here.