Could anyone explain how to use a YAML file when converting images with Convimg? I followed the instructions in the ICE documentation, but they were written for ConvPng. What are the differences between Convimg and Convpng, and how exactly do you convert images with Convimg? Thank you! By the way, I'm using mac. Sad
here is the YAML:
palettes:
- name: mypalette
images: automatic

converts:
- name: hi.png
palette: mypalette
images:
- hi.png

outputs:
- type: ice
include-file: ice.txt
palettes:
- mypalette
converts:
- myimages

Code:

palettes:
  - name: mypalette
    images: automatic

converts:
  - name: hi.png
    palette: mypalette
    images:
      - hi.png

outputs:
  - type: ice
    include-file: ice.txt
    palettes:
      - mypalette
    converts:
      - myimages
randomguy wrote:
here is the YAML:
palettes:
- name: mypalette
images: automatic

converts:
- name: hi.png
palette: mypalette
images:
- hi.png

outputs:
- type: ice
include-file: ice.txt
palettes:
- mypalette
converts:
- myimages


I think that I see what's wrong.
You say that it should convert 'myimages' but that's not the images it should convert, that's the name of the pallette.


Code:
palettes:
    - name: mypalette
    images: automatic

converts:
    - name: images
    palette: mypalette
    images:
    - hi.png

outputs:
    - type: ice
    include-file: ice.txt
    palettes:
        - mypalette
    converts:
        - images

That will do it probably.
This works:

Code:
palettes:
  - name: mypalette
    images: automatic

converts:
  - name: myimages
    palette: mypalette
    images:
      - hi.png

outputs:
  - type: ice
    include-file: ice.txt
    palettes:
      - mypalette
    converts:
      - myimages

You're trying to convert "myimages", which doesn't exist, you had "hi.png" which isn't used.
Terminal still says:

Code:
 
childrennointernet@MacBook-Air ~ % /Users/childrennointernet/Desktop/untitled\ folder/convimg ; exit;
[error] Missing input file.
[info] Run /Users/childrennointernet/Desktop/untitled folder/convimg --help for usage guidlines.
[info] Run /Users/childrennointernet/Desktop/untitled folder/convimg --new to create a template 'convimg.yaml' file.

[Process completed]
randomguy wrote:
Terminal still says:

Code:
 
childrennointernet@MacBook-Air ~ % /Users/childrennointernet/Desktop/untitled\ folder/convimg ; exit;
[error] Missing input file.
[info] Run /Users/childrennointernet/Desktop/untitled folder/convimg --help for usage guidlines.
[info] Run /Users/childrennointernet/Desktop/untitled folder/convimg --new to create a template 'convimg.yaml' file.

[Process completed]


ah, you should do:

Code:
/Users/childrennointernet/Desktop/untitled\ folder/convimg i convimg.yaml

so first call the convimg, then say i, followed by the yaml file.
yea
I'm using the convimg from CEdev
You need to either run convimg in the same directory that contains the convimg.yaml file, or call convimg with convimg -i /path/to/your/convimg.yaml

I'd also recommend renaming "untitled folder" to something else, as spaces in directory names cause tons of issues for command-line tools.
then do:

Code:
./$(LOCATION_OF_CEDEV_FOLDER)/bin/convimg i $(FOLDER_WHERE_YAML_FILE_IS_LOCATED)/convimg.yaml

where you replace $(LOCATION_OF_CEDEV_FOLDER) for the location of the CEdev folder.
and replace $(FOLDER_WHERE_YAML_FILE_IS_LOCATED) for the location of the folder where you have the convimg.yaml file.
And as commandblockguy says, the space might indeed be an issue, maybe replace the space for an underscore
It works now, except that it has an issue on "mapping values"

Code:

childrennointernet@MacBook-Air ~ % /Users/childrennointernet/Desktop/untitled\ folder/convimg ; exit;
[info] Reading file 'convimg.yaml'
[error] Problem description: mapping values are not allowed in this context
[error] Problem is probably around line 2.

[Process completed]


Code:

palettes:
          - name: mypalette           : Palette and name of palette
            images: automatic         : Automatically get list of images

        converts:
          - name: myimages            : Convert images section
            palette: mypalette        : Use the above generated palette
            images:                   : List of input images
              - hi.png

        outputs:                      : List of outputs
          - type: ice                   : Sets the output format to ice
            include-file: ice.txt       : File name containing all images/palettes
            palettes:                 : Start of palettes list in the output
              - mypalette             : Name of each palette, separated by line
            converts:                 : Converted sections, based on name
              - myimages
i didn't actually have those spaces, cemetery somehow added them
Question this is my actual yaml

Code:

palettes:
  - name: mypalette
    images: automatic

converts:
  - name: myimages
    palette: mypalette
    images:
      - hi.png

outputs:
  - type: ice
    include-file: ice.txt
    palettes:
      - mypalette
    converts:
      - myimages
but terminal still says:

Code:

childrennointernet@MacBook-Air ~ % /Users/childrennointernet/Desktop/JohnPaul\'s\ Folder/TI\ 84\ Plus\ CE/Project\ Files/ConvImg/convimg ; exit;
[info] Reading file 'convimg.yaml'
[error] Problem description: mapping values are not allowed in this context
[error] Problem is probably around line 2.

[Process completed]

how? I thought i followed the instructions, i even copied and pasted the code from your Oiram example.
I ran convimg.exe using the following .yaml

Code:

palettes:
  - name: mypalette           
    images: automatic         

converts:
  - name: myimages   
    palette: mypalette       
    images:                   
      - hi.png

outputs:                     
  - type: ice             
    include-file: ice.txt     
    palettes:         
      - mypalette           
    converts:               
      - myimages   

and ice.txt was outputted successfully, so there definitely isn't any issues with convimg itself. I wonder if there might be a bug specific to MacOS (since I'm on windows?), but I'm not going to jump to any conclusions.

Anyways, if you want convpng specifically, then you can just go through convimg's release history on github and grab the latest version of convpng before it was directly replaced by convimg here. Then just move convpng.exe into the same directory as your .ini file (as described in the ICE documentation), and then you should just be able to run convpng.

Just a hunch, but you may want to check that hi.png is truly formatted as a .png (as in, its not a .jpg with a .png tacked to the end of it)

Also, as a note, if you want to add something to your post and no one has responded to it, its generally good practice to simply edit your last post instead of posting multiple times consecutively.
He's just running from the wrong directory. There's a convimg.yaml in his home directory that he keeps trying to convert.
i already switched the directory with "cd" in the terminal to the folder in which I have the .png, yaml, and convimg:

Code:

childrennointernet@MacBook-Air ~ % cd /Users/childrennointernet/Convimg
childrennointernet@MacBook-Air Convimg % /Users/childrennointernet/Convimg/convimg2 -i /Users/childrennointernet/Convimg/convimg.yaml
[info] Reading file '/Users/childrennointernet/Convimg/convimg.yaml'
[error] Problem description: mapping values are not allowed in this context
[error] Problem is probably around line 2.
childrennointernet@MacBook-Air Convimg %

however, there is still the error. am I supposed to put all the stuff in my home directory and just run it from there, or can I keep it in the folder it is in? and, was I supposed to switch directories in the terminal a different way? and, did I use cd correctly?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement