473,385 Members | 1,312 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,385 software developers and data experts.

Altering the PixelFormat of an Image

If you have a bitmap, but need for it to be of a different PixelFormat, how
can you do that? PixelFormat is ReadOnly. Does it have to be done while
Drawing to a graphics object? I wonder if there's a code sample available
somewhere in which this is done. Thanks

Phil Galey
Nov 21 '05 #1
2 1472
Hi,

Create a new bitmap and specify the pixelformat in the
constructor. Draw the old image on the new bitmap.

Ken
---------------------
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
If you have a bitmap, but need for it to be of a different PixelFormat, how
can you do that? PixelFormat is ReadOnly. Does it have to be done while
Drawing to a graphics object? I wonder if there's a code sample available
somewhere in which this is done. Thanks

Phil Galey

Nov 21 '05 #2
Hi,

Create a new bitmap and specify the pixelformat in the
constructor. Draw the old image on the new bitmap.

Ken
---------------------
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
If you have a bitmap, but need for it to be of a different PixelFormat, how
can you do that? PixelFormat is ReadOnly. Does it have to be done while
Drawing to a graphics object? I wonder if there's a code sample available
somewhere in which this is done. Thanks

Phil Galey

Nov 21 '05 #3

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

Similar topics

3
by: Flix | last post by:
Is there some way to convert a Bitmap from one PixelFormat (16bit or with indexed colors) to another(24bit), without doing per pixel operations?
0
by: Phil Galey | last post by:
If you have a bitmap, but need for it to be of a different PixelFormat, how can you do that? PixelFormat is ReadOnly. Does it have to be done while Drawing to a graphics object? I wonder if...
3
by: johnb41 | last post by:
I need to use the bitmap.getpixel method to work on the pixel level of an image. But GetPixel will not work with Indexed images. The images that i work with are black & white text scans. I...
0
by: Mil | last post by:
Hello, I'm trying to convert Images using Bitmap class. I want to use different options for example reduce the size of image. In my code I tried to create a Bitmap class instance with a...
2
by: Sharon | last post by:
Hello Experts, I'm creating a bitmap object like this: Bitmap myImage = new Bitmap(1024, 1024, System.Drawing.Imaging.PixelFormat.Format24bppRgb); But when I invoking the function myImage...
9
by: JimmyKoolPantz | last post by:
IDE: Visual Studio 2005 Language: VB.NET Fox Pro Driver Version: 9.0.0.3504 Problem: I currently have a problem altering a DBF file. I do not get any syntax errors when running the program. ...
1
by: zufie | last post by:
Hi, I want to specifying a foreign key by altering a table. First, I create an ORDERS table without specifying a foreign key. Here is my code: CREATE TABLE ORDERS (Order_ID integer,...
1
by: theShmit | last post by:
I am writing a regression testing suite that uses some image comparison features for some RFI (radio frequency interference) testing equipment. I capture an image (from the screen of the device),...
1
by: Nathan Sokalski | last post by:
I have created declared a Bitmap using the following statement: Dim bmp As New Bitmap(100, 100, PixelFormat.Format8bppIndexed) Because the SetPixel() method is disabled and a Graphics object...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.