473,732 Members | 2,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bitmap masking the .NET way

Hello there,
Does anyone know how to to Bitmap masking in .NET,
In c++ i used,
CreateCompatibl eDC
GetBitmap

Then on the bitmap and the bitmap mask i called.
{SelectBitmap
StretchBlt}

No I gather i can do this
Bitmap offScreenBmp;
Graphics offScreenDC;
offScreenBmp = new Bitmap(this.Wid th, this.Height);
offScreenDC = Graphics.FromIm age(offScreenBm p);

but how do i load the second bitmap mask somehow to make a transparent bitmap?

thanks in advance
Brian Keating

Nov 16 '05 #1
1 5236
Hello again,
think i've this one sussed.
Bitmap class has a MakeTransparent method this is what i want I should think
thanks for having a look however

regds
Brian Keating

"Brian Keating EI9FXB" wrote:
Hello there,
Does anyone know how to to Bitmap masking in .NET,
In c++ i used,
CreateCompatibl eDC
GetBitmap

Then on the bitmap and the bitmap mask i called.
{SelectBitmap
StretchBlt}

No I gather i can do this
Bitmap offScreenBmp;
Graphics offScreenDC;
offScreenBmp = new Bitmap(this.Wid th, this.Height);
offScreenDC = Graphics.FromIm age(offScreenBm p);

but how do i load the second bitmap mask somehow to make a transparent bitmap?

thanks in advance
Brian Keating

Nov 16 '05 #2

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

Similar topics

2
3957
by: Ginchy | last post by:
I have uploaded a small 3 page web using MS Publisher 2003 and after uploading I switched on url masking to cloak the url. I am certain that it worked fine. I simply changed the colour scheme in Publisher and reuploaded the page. The links no longer work? When I switch off url masking it works as it should?
0
1394
by: Dana Epp | last post by:
I have a ToolBarButton that when I set it to disabled (button.Enabled = false;) causes a really ugly gray masking effect to take place. This is normal and the intended way of the button, but I would like to clean it up. Instead of using the gray mask, I want to use my own grayscaled high quality image. I thought by simply setting button.ImageIndex = new_num; (where new_num is the index of the grayscale image) I could do this. But alas, that...
2
2780
by: James Dean | last post by:
Could anybody tell me the most efficient way to set the bits in a 1Bpp class. I am reading in byte lines of an image. The byte array tells me what what bits are turned on or off.....i do bit masking to get the colour....i can just convert the whole Line byte array to a bitarray.....Also i have trouble about how to set the pointer to point at a bit instead of a byte.....when i lock the the bits i want the pointer pointing at a bit not a...
8
7176
by: James Dean | last post by:
I have 1 bit per pixel information and i have the width and height of this data.Each bit corresponds to a 24 bit colour value. I want to convert this to 24bit per pixel bitmap. Do i need to multiply the width and the height by 24 or just the width?. I tried to multiply the width by 24 but the value is too large?.....what can i do?. The 1bpp data is at resolution 600dpi.....can i just use the set resolution function to change it to 96dpi...
0
1290
by: James Dean | last post by:
I have trouble displaying a bitmap. I have 1bpp information. I also have a command telling me what color i need to set the bytes to when the colour is switched on. The trouble is i do all this but it will not display properly. I convert this to 8bpp information. I set the relevant pixel to for example "255,0,0" for Red.....is this right?....i set the Red byte to 255 and the other two values set to 0. I think the Bitmap data class i am...
6
3760
by: Lespaul36 | last post by:
From what I have read, there isn't really a converter to icon format..it becomes a png file. I tried: 1: Dim bmp As Bitmap = CType(Bitmap.FromFile("C:\myfolder\file.bmp"), Bitmap) 2: Dim ico As Icon = Icon.FromHandle(bmp.GetHicon()) 3: Dim file As FileStream = New FileStream("C:\myfolder\file.ico",FileMode.OpenOrCreate) 4: ico.Save(file) 5: file.Close()
7
8239
by: Fir5tSight | last post by:
Hi All, I used the following code in C#: using System.Drawing; //blah blah blah Bitmap bmp = new Bitmap();
9
2271
by: Daniel Smedegaard Buus | last post by:
Hey all :) I was wondering about the $error_types (I particularly notice the 's' suffix when reading the manual) parameter for 'set_error_handler()': Can be used to mask the triggering of the error_handler function just like the error_reporting ini setting controls which errors are shown. Without this mask set the error_handler will be called for every error regardless to the setting of the error_reporting setting.
2
5329
by: meghla | last post by:
I can not understand how to implement bit masking on a c code?? while working with array it is taking too much time.................. so i need help. i need some suggestion and sample code of C dealing with bit masking..............; its argent............. plz help me.
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.