[Ham-Linux] PNG files <--> GIF files conversions
Ronald KA4INM Youvan
[email protected]
Sun, 19 Jan 2003 03:14:03 +0000
> I'm hoping someone has written a utility so I can go:
> [whatevercommand] *.gif *.png
Get, install and enjoy ImageMagick. It supplies and uses
"convert" which converts most anything to anything. (image files)
Go into midnight commander (with mc <ENTER>) press the * on the
numeric keyboard, press F2 cursor to the top choice, press <ENTER>
and the 2png, (Put the following script file in /usr/local/bin
or your equivalent.)
#!/bin/bash
# /usr/local/bin/2png
# by Ron KA4INM Youvan
FileName=${1%.*}.png
case $1 in
*.png ) snd 0 ; exit 1 ;;
*.jpg ) snd 0 ; exit 1 ;;
*.pnp ) snd 0 ; exit 1 ;;
*.jpeg ) snd 0 ; exit 1 ;;
*.JPG ) snd 0 ; exit 1 ;;
*.gif ) convert $1 $FileName ;;
*.GIF ) convert $1 $FileName ;;
*.tif ) convert $1 $FileName ;;
*.tiff ) convert $1 $FileName ;;
*.TIF ) convert $1 $FileName ;;
*.TIFF ) convert $1 $FileName ;;
*.pcx ) convert $1 $FileName ;;
*.PCX ) convert $1 $FileName ;;
*.bmp ) convert $1 $FileName ;;
*.BMP ) convert $1 $FileName ;;
* ) echo "Could not convert \" " $1 ;;
esac
sndcw 'e-' # sends a beep to the speakers, one for each file processed
exit 0
done
#
# END /usr/local/bin/2png
> Also: if I do convert all of the gif files on my website to png files,
> what percentage of those browsing the web WOULD NOT be able to view the
> png files? While I'd like to change just so the Unisys giant won't come
> after THIS little guy, if many won't be able to read my files I won't do
> it.
Any that don't will, or the Unisys giant will come after them.
It is the image format of the future, but it doesn't support
converted animated gifs, another one coming along will.
--
73 (= Best Regards) de: Ron [email protected]
100% Slack. since July, 1997 (still free!) SENT D&T are UTC
Visit my HAM Web SITE at: http://www.qsl.net/ka4inm