LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-31-2010, 02:30 AM   #1
KillerCode
Member
 
Registered: Nov 2010
Posts: 57

Rep: Reputation: 0
Remove Alpha Channel from Bitmaps?


is there anyway i can remove alpha channel from bitmaps without messing them up?

thanks.
 
Old 12-31-2010, 03:52 AM   #2
redhatstand
Member
 
Registered: Jul 2006
Location: Oxford, UK
Distribution: CentOS, Ubuntu
Posts: 37

Rep: Reputation: 7
Hi,

Worth stating which file format(s) you are planning to work with: e.g. did you mean .bmp files exclusively?

I've found (lib)cairo very useful for image manipulation: you may find help commentary in the (lib)cairo source code / docs.

Pretty sure it is on www.sf.net, failing that freshmeat.net

Regards,

Andy T
 
Old 12-31-2010, 05:58 AM   #3
KillerCode
Member
 
Registered: Nov 2010
Posts: 57

Original Poster
Rep: Reputation: 0
i dunno what am i looking for :/
 
Old 12-31-2010, 06:53 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Do you want to do it interactively or programatically?
 
Old 12-31-2010, 07:03 PM   #5
KillerCode
Member
 
Registered: Nov 2010
Posts: 57

Original Poster
Rep: Reputation: 0
programatically, im coding in c
 
Old 12-31-2010, 08:24 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
ImageMagick's "mogrify" utility can deactivate alpha channels. It follows that ImageMagick's C API has functions to remove alpha channels from bitmaps. You can use them, or you can cheat and spawn "mogrify."
 
Old 12-31-2010, 10:29 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
how many ? one or two ? or 500 ?
for a few i would use Gimp
for many Imagemagick
 
Old 01-01-2011, 12:28 AM   #8
KillerCode
Member
 
Registered: Nov 2010
Posts: 57

Original Poster
Rep: Reputation: 0
but imagemagick is massive library, my whole application is like 200 kb :/ no other solution?

thanks
 
Old 01-01-2011, 12:36 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you are writing a program you could just use CImg.h
http://cimg.sourceforge.net/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GIMP: How to remove alpha channel without changing RGB channels Simon Bridge Linux - Software 2 07-07-2009 08:12 AM
How do you change the Novell Bitmaps?? mbjunior99 SUSE / openSUSE 1 10-17-2006 09:54 AM
Problem with X11/bitmaps EAD Linux - Newbie 2 04-28-2006 04:15 AM
LILO Bitmaps Murdock1979 Slackware 3 09-13-2005 04:11 PM
Why does my Alpha Channel = 0 bits? JohnKFT Slackware 1 02-18-2004 03:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration