473,399 Members | 4,254 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,399 software developers and data experts.

PixelFormat.Format8bppIndexed in Bitmap Hangs!

Mil
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 Bitmap's
constructor:
new Bitmap(source.Width, source.Height, PixelFormat.Format8bppIndexed);

The result was that program stopped executing and started to hang. If I
create a Bitmap
with a constructor Bitmap(source.Width, source.Height) everything is
ok.

Does anyone know what happends when I give PixelFormat class as an
third parameter
to Bitmap's constructor?

So, If this does not work how should I create different type of Bitmaps
with different features?

My purpose is to convert Color Tiff image to as light GrayScale Tiff
image as possible (ligth = size of the file is smallest). Can C#'s
Image handling classes help me or not.. anyone know
about this?

Cheers.

Jan 13 '06 #1
0 3812

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?
2
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...
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...
7
by: Fir5tSight | last post by:
Hi All, I used the following code in C#: using System.Drawing; //blah blah blah Bitmap bmp = new Bitmap();
14
by: eliss.carmine | last post by:
I'm using TCP/IP to send a Bitmap object over Sockets. This is my first time using C# at all so I don't know if this is the "right" way to do it. I've already found out several times the way I was...
2
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process stdout. I know there were several reports related to...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.