This is my first Linux shell script. It creates animations like http://www.furaffinity.net/view/5677494/ .
Essentially, it does two things: extracts black-n-white information from the image, and then creates the transition animation from B/W image to colored one.
It takes the following arguments:
- Source image
- B/W image. If '-' is specified, it is generated.
- Colored image. If '-' is specified, it is generated to contain two colors per square. The palette is chosen for the image, no predefined colors are used.
- Zoom factor (optional). If present, the animation is resized to specified factor, and also optimized.
For example, that animation was created using line like this:
./screen eerph48.gif - eerph48.gif 2
Where eerph48.gif is a 48x48 version of my userpic. I used the original as the colored image because the generated color doesn't look good, the source image is not intended for ZX display.
If no -'s are specified (both bw and color images are provided), the generation step is skipped.
The script requires ImageMagick ("convert") to work, and creates several output files.
Essentially, it does two things: extracts black-n-white information from the image, and then creates the transition animation from B/W image to colored one.
It takes the following arguments:
- Source image
- B/W image. If '-' is specified, it is generated.
- Colored image. If '-' is specified, it is generated to contain two colors per square. The palette is chosen for the image, no predefined colors are used.
- Zoom factor (optional). If present, the animation is resized to specified factor, and also optimized.
For example, that animation was created using line like this:
./screen eerph48.gif - eerph48.gif 2
Where eerph48.gif is a 48x48 version of my userpic. I used the original as the colored image because the generated color doesn't look good, the source image is not intended for ZX display.
If no -'s are specified (both bw and color images are provided), the generation step is skipped.
The script requires ImageMagick ("convert") to work, and creates several output files.
Category Poetry / Portraits
Species Unspecified / Any
Size 120 x 120px
File Size 3.3 kB
Well, perhaps similar in power, though C64 has richer graphics. ZX has rather odd video organization, the b/w image (with scanlines out-of-order) is colored by 8x8 squares, each square having only two colors of 8 (or 16): background and foreground - the animation shows something alike. 256x192 and no hardware sprites.
http://www.furaffinity.net/view/880365/
http://www.furaffinity.net/view/880365/
The fourth argument - the image is enlarged by this factor. So if you wish your userpic 96x96 with large pixels, you might do something like that:
# Let's say cheery314.jpg is your original userpic, here we resize it to 48x48
convert cheery314.jpg -resize 48x48! cheery48.ppm
# Create an animation with the same settings as my own avatar, scale factor 2
./screen cheery48.ppm - cheery48.ppm 2
# The output (load_2.gif) will be 96x96 with 2x2 chunks
# Let's say cheery314.jpg is your original userpic, here we resize it to 48x48
convert cheery314.jpg -resize 48x48! cheery48.ppm
# Create an animation with the same settings as my own avatar, scale factor 2
./screen cheery48.ppm - cheery48.ppm 2
# The output (load_2.gif) will be 96x96 with 2x2 chunks
FA+

Comments