473,326 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Image Flags Alpha

I have notice that my images have the value Image.Flags = 2 (HasAlpha).
How Can I set the Flags to 1? I would like to eliminate the alpha channel...
--
RicercatoreSbadato
Nov 17 '05 #1
1 4257
Removing alpha from your image would not set the flags to 1, but instead
remove the 2. Take a look at
http://msdn.microsoft.com/library/de...classtopic.asp
for some info on which flags are available. Just for note, the flags cannot
be directly set via the Flags property as they represent the properties of
the image referenced, in order to change them, you must change the image.

In order to have your image not have alpha information, you will need to
choose a format that does not use it. For instance, when creating a new
Bitmap, you might call the constructor with:

Bitmap(320,240, System.Drawing.Imaging.PixelFormat.Format32bppRgb) ;

Which overrides the default format of Format32bppArgb.

Without knowing the specifics of what you are doing internally it is hard to
say exactly what you would have to do, so if it is creating a new image and
not having it not have an Alpha channel, then what I mentioned above is what
you would want to do. If you’ve got an existing image that you want to remove
Alpha from, you can simply draw it to a new image that does not support that
channel and do with it as you please (display, save, etc).

Brendan
"RicercatoreSbadato" wrote:
I have notice that my images have the value Image.Flags = 2 (HasAlpha).
How Can I set the Flags to 1? I would like to eliminate the alpha channel...
--
RicercatoreSbadato

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: steve | last post by:
Hello, I am trying to import an image file into a form. This would be a persons picture saved in the same directory for every unique record. I don't have any problems making an action button to...
1
by: Baramuse | last post by:
Hi, I wonder if it was possible to change the opacity of an image in a picturebox for example : I try to make a splash screen that shows up images (one after one). But i would like to change the...
0
by: yxq | last post by:
Please add the manifest file! ************************************************************* Imports System Imports System.Drawing Imports System.Runtime.InteropServices Module Module1 Public...
5
by: yxq | last post by:
Hello The icons with the alpha channel are supported in WindowsXP. If use the System.Drawing.Bitmap.ToBitmap on the icon handle(ico.ToBitmap), the alpha channel won't be preserved, resulting in an...
18
by: Andrew Christiansen | last post by:
Hey all. The images I create in photoshop with semi-transparent pixels (for instance in Photoshop text with a dropshadow with a transparent canvas) I've been saving in PNG format and then using...
0
by: Odalrick | last post by:
I need to generate wx.Bitmap with a hole in them, i.e. the whole bitmap is one colour, greyish with alpha = 255*.6, except for one rectangle that has alpha = 0 . Currently I'm doing this with...
2
by: devnew | last post by:
hi i am new to python and PIL and was trying to write a class to read and write RGB color model jpeg images.. i came up with this class below..i want to know if this is the way to read/write the...
0
by: Arvi Laanemets | last post by:
Hi We are trying to create a simply ASP code, which creates guests list from Access database, and displays a country flag for every guest. All flag images are stored as *.gif in subfolder...
2
by: Peter Morris | last post by:
I have a 200x200 PNG file which has an Alpha layer. What I would now like is a 200x200 image that is completely black, but with the same alpha mask. This is so that I can use it as a drop shadow...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.