Ardu-imconvert - A desktop image converter for Arduboy


#21

New release!

#v0.5

Changes

  • Removed limitation on image size (incompatible formats will be automatically deactivated)
  • Added formats: Sprites::drawOverwrite, Sprites::drawErase, Sprites::drawSelfMasked
  • Minor UI tweaks
  • Better macOS integration

Downloads


Sorry for the late answer: planned for v0.6 (which will come faster than v0.5!)


(Boti Kis) #22

yesss, very nice. We have an app icon :smiley:


#23

New release!

v0.6

Changes

  • New basic image operations: negative (invert pixels) and slice tiling (useful for tilemap or single image based animation)
  • Minor UI tweaks and bugs fixed

How to use image slice

From menu image->add slice, enter the size of a tile (width and height) and the image will be automatically sliced according to this size.

The slicing process goes from left to right then top to bottom. There is no size restriction. You can use the animation slider to display each slice/tile.

This is typically useful for tilemap, or for one single image animation (when all frames are in one image).

Downloads


(Erwin) #24

Wonderful. This is by far my prefered converter for Arduboy :slight_smile:

I have some suggestions:

  1. Button to copy output
  2. For formats that do not have size specification (like drawBitmap, you can add a comment in the output)
  3. Batch process the opened/selected files (like save each output in filename.c format)
  4. Maybe list files in subfolders (no need for UI changes, just different name like sprites/name)

(Boti Kis) #25

Oh yes, batch would be amazing.


#26

Thank you very much.

1 - you mean a copy to clipboard button?

For the other, I see no specific problem: I will include them to the 0.7 todo list.


(Erwin) #27

Awesome!

Yes. copy to clipboard. Or to save to file? I personally just select and “cut” the code so a button might be handy


#28

New release!
As usual, feedback is welcome.

v0.7

Changes

  • New Export and Export selected images functions
  • Copy to clipboard button
  • Asset directory browser now includes also subdirectories
  • Added image width and height as comment to format that don’t include width and height
  • Minor UI tweaks

How export works

It makes a c++ header file next to the image following the naming: filename.h and using the chosen format.

Export selected images only works with selected images in the small assets directory browser and the same way as Export.

Additional info

I never explained it, but you can zoom and pan the image loaded in the view using the mouse click and mouse wheel.

Downloads


(Erwin) #29

Amazing! looks and works great!

Small suggestions, mostly visual:
-Copy to clipboard looks kinda ugly and not properly aligned with the format box, maybe it could be just “Copy” with a nicer icon :stuck_out_tongue: and Ctrl+C as shortcut

-I am not sure if Export and Export Selected makes sense, for me it is Export selected and Export all (because I personally wont ever do a complex selection in that dialog)

-Maybe a simple addition could be to have:
Export selection
Export all
Export selection as… (this would ask you for a filename and combine all the outputs and the dialogs should remember the previous path and filename)
Export all as…

-For some multi-color gif (maybe 32 bits?) example: https://github.com/eried/ArduboyUploader/blob/master/src/ArduLoader/img/error.gif I get an error msgbox that I have to click OK to dismiss and continue, I do not know if there is any point on doing that. I would prefer a silent or visual feedback (like in the status bar "Image: Not compatible) or in the preview a little icon with an X

Anyway, I am JUST REALLY nitpicking, the app is wonderful. Just giving some feedback back

PS: Nobody uses drawBitmap Mask?


#30

Thank you!

copy button

  • I didn’t know where to put it, so yes the alignment is not perfect, I will maybe move it for a next release.
  • For the icon, well, if you can find me another one, I will be pleased to replace it :slight_smile:
  • For the Ctrl+C shortcut, I was thinking of a shortcut, but I don’t want to use the Crtl+C because it will overwrite the normal behaviour of the text edit box below (i.e.: if somebody select a line from the output and hit ctrl+c, then the whole text will be copied than just the line which breaks the normal behaviour). So if you can find me another shortcut for it, I will add it.

export
I was already thinking of an Export as feature, but didn’t want to put too much menu entries and keep it simple for the moment, but It will come for the next release for all export functions!

For the export all, you can do with ctrl+a > ctrl+shift+e for the moment, but I will add a menu entry for it.

I think the granularity of export functions is important (export current, export selected, export all) depending on what you want to update for testing one image for example (export current) or even if you need multiple formats images (export selected).
Beside that, the export process can be redefined, but in my case, I have both compressed and non-compressed, with and without mask image data, so being able to choose which to export and which format is a must.

The big stuff for me here is to keep the balance between the number of functionalities, combinations and simplicity. But I guess it is still ok.

I tried to load it from the v0.7, it seems to work for me, I got no error?

I didn’t understand, Arduboy2::drawBitmap doesn’t have any mask support?


(Erwin) #31

Thanks for improving the app so much!

Is not that the icon is ugly, but it is a bit fuzzy, a normal sharper one will do it, like: http://www.iconarchive.com/show/must-have-icons-by-visualpharm/Copy-icon.html[quote=“zeduckmaster, post:30, topic:3024”]
For the Ctrl+C shortcut, I was thinking of a shortcut, but I don’t want to use the Crtl+C because it will overwrite the normal behaviour of the text edit box below (i.e.: if somebody select a line from the output and hit ctrl+c, then the whole text will be copied than just the line which breaks the normal behaviour). So if you can find me another shortcut for it, I will add it.
[/quote]

Yeah, you are right. It might be confusing, but if the textbox is not selected/focused there is no conflict with using Ctrl+C for copying all text in the textbox, the problem is what the button does when there is text selected… uhmm

Right that makes things even more complicated. You are right, the app is currently simple enough. Maybe a ribbon like the one in office could combine more functionality and simplicity at the same time, but I am just thinking aloud :slight_smile: [quote=“zeduckmaster, post:30, topic:3024”]
I tried to load it from the v0.7, it seems to work for me, I got no error?
[/quote]

Strange, I get:

[quote=“zeduckmaster, post:30, topic:3024”]
I didn’t understand, Arduboy2::drawBitmap doesn’t have any mask support?
[/quote]

Nah, I think having the inverse as the mask for the drawBitmap is convenient, but I am again nitpicking because I used that for an earlier game (I mean, the alternative if you are using drawBitmap is to inverse the image)


#32

Ok, got it, I will replace it with this one!

Ok, can you try with this image (which is basically yours but downloaded from my computer):

Which operating system are you using? (don’t think that really matters, but …)


(Erwin) #33

Same result, also if I drag the image to the textbox I get the URL :joy:

I am using Windows 10


#34

New release!
As usual, feedback is welcome.

@eried The gif bug should be fixed for windows.

v0.8

Changes

  • New Export All function
  • All export functions have an As version to specify export filename and allow exporting multiple image to one single header file
  • Minor UI tweaks

Downloads


(Erwin) #35

Hey,

When using the drawCompressed I get

D:\GitHub\ArduboyDualogGame\arduino\loop.ino: In function 'void drawFace(byte, byte, byte, byte, byte, byte, byte, byte, byte)':

D:\GitHub\ArduboyDualogGame\arduino\loop.ino:6:34: warning: invalid conversion from 'byte {aka unsigned char}' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]

   arduboy.drawCompressed(x,y,chin);

Is that a normal warning?


(Pharap) #36

Is chin a byte by any chance?
If so, you’re passing the wrong type.

static void drawCompressed(int16_t sx, int16_t sy, const uint8_t *bitmap, uint8_t color = WHITE);

It’s not necissarily a bug, but it depends on your code.
Also it might have nothing to do with Ardu-imconvert.


(Erwin) #37

I am using the output directly, the output is:

//D:/GitHub/ArduboyDualogGame/images/face/chin_sprite_01.png
unsigned char const chin[] PROGMEM =
{
  47, 47,
  0x40, 0x3b, 0x07, 0x2d, 0x05, 0xbf, 0xa5, 0xd7, 
  0xeb, 0xf4, 0x7a, 0x9d, 0x4e, 0xa7, 0x53, 0xce, 
  0xa7, 0xd3, 0xd9, 0xe5, 0x36, 0xbb, 0xdc, 0x86, 
  0x76, 
};

Maybe it is an arduino weirdness. It works, but throws that warning


(Pharap) #38

Hrm, in that case it might be drawFace that’s causing the warning.
Are you passing chin as one of the arguments to drawFace?

(Also maybe you should split this into its own thread instead of hijacking ardu-imconvert, since at the moment it looks like this is nothing to do with ardu-imconvert.)


(Erwin) #39

The output comes from the app code generation. If is not related at least @zeduckmaster has to update the app


(Pharap) #40

Does it generate the code as well or just the image data?
If it’s just the image data then it’s probably not related to ardu-imconvert, if it also generates code, the code might be wrong and then it would be ardu-imconvert’s fault.

If you can post a bit more of the code it will what is causing the problem clearer.