mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-11-16 15:33:28 +00:00
Clarified about the versions that have different commands for run IM
@@ -20,23 +20,26 @@ You can of course use https://hackrf.app/ to upload them directly to SPLASH dire
|
||||
## Tools / How-to
|
||||
Use your favorite picture editor to adjust size, or use "convert" from [ImageMagick](imagemagick.org), which is a powerful image manipulation tool. It is open source and available for all common operating systems.
|
||||
|
||||
> [!INFO]
|
||||
> From version 7 of [ImageMagick](imagemagick.org) you will get a warning when running with `convert` or `magick convert` saying that the command is depricated and you should now use `magick` only
|
||||
> `WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"`
|
||||
### To just scale the picture down, use:
|
||||
```
|
||||
$ magick source.jpg -resize 240x304 destination.bmp
|
||||
$ convert source.jpg -resize 240x304 destination.bmp
|
||||
```
|
||||
|
||||
### If you see and don't want a frame left and right, you can adjust the convert with:
|
||||
```
|
||||
$ magick source.jpg -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
$ convert source.jpg -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
```
|
||||
|
||||
### To choose the filling color when resizing/extending the image, add '-background color' after 'source.jpg':
|
||||
```
|
||||
$ magick source.jpg -background "#000000" -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
$ convert source.jpg -background "#000000" -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
```
|
||||
or
|
||||
```
|
||||
$ magick source.jpg -background black -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
$ convert source.jpg -background black -resize 240x304 -gravity center -extent 240x304 destination.bmp
|
||||
```
|
||||
The list of predefined colors can be obtained with ```convert -list color```
|
||||
|
||||
@@ -47,9 +50,9 @@ destination.bmp BMP3 240x300 240x304+0+0 8-bit sRGB 216054B 0.000u 0:00.000
|
||||
```
|
||||
If it is saying '8-bit', you're good. It's the number of bits by color components. For sRGB, 8+8+8 = 24-bit
|
||||
|
||||
_If you have save the image via a different program and it looks right when using the identify command above, try to convert anyway with magick._
|
||||
|
||||
> [!INFO]
|
||||
> If you have save the image via a different program and it looks right when using the `identify` command above, try to convert it again with [ImageMagick](imagemagick.org) following the instructions above.
|
||||
## Limitations
|
||||
- image have to be a 24 bits bitmap
|
||||
- width have to be exactly 240 pixels wide
|
||||
- height have to be in the [ 1 , 304 ] range. Any additional lines will be cut
|
||||
- height have to be in the [ 1 , 304 ] range. Any additional lines will be cut.
|
||||
Reference in New Issue
Block a user