Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 15 Oct 2019, 02:43
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Howto: change the bit depth of a png using imagemagick
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
disciple

Joined: 20 May 2006
Posts: 6980
Location: Auckland, New Zealand

PostPosted: Fri 20 Sep 2019, 02:25    Post subject:  Howto: change the bit depth of a png using imagemagick  

I wanted to convert pngs to 4bit, and it was difficult to find a command that worked i.e. imagemagick with the -depth option. Imagemagick has other options that sound like they do it, but they don't!
Code:
# PNG is smaller than jpg, but it seems html2ps only accepts 4bit png, otherwise it converts to a noisy jpeg!
for i in !(*_4bit).png
 do
  # we will write the png here instead
  #( mv "$i" "${i%%.*}.PNG" ) &
  ( convert "$i" -depth 4 "${i%%.*}_4bit.PNG" ) &
 done

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0302s ][ Queries: 12 (0.0106s) ][ GZIP on ]