473,385 Members | 2,005 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.

bitmap save info

Hi group when save a bitmap called saveBmp like this:

<<<<
saveBmp.Save(filename, ImageFormat.Jpeg)
<<<<

the bitmap gets saved with it's size propertys, so if I right click the file
and select propertys I can see the width and the height of the image. But if
I save the bitmap as a bitmap:

<<<<
saveBmp.Save(filename, ImageFormat.Bmp)
<<<<

this information doesn't get saved, is there something I can do about this,
should I declare the bitmap in a specified format?

I already found the answer while typing this post but I'm still going to
post it because maybe it's useful for someone else. The solution is to
create the bitmap as follows:

<<<<
saveBmp = new bitmap (width,height, PixelFormat.Format24bppRgb)
<<<<
Nov 21 '05 #1
2 1659
Peter,

When you have the answer this is not a good post, this will be opened again
and again because somebody is thinking you have a question, therefore this
message.

When you do this the least you have to do is to tell in the subject that it
is not a question.

Cor

"Peter Proost"
Hi group when save a bitmap called saveBmp like this:

<<<<
saveBmp.Save(filename, ImageFormat.Jpeg)
<<<<

the bitmap gets saved with it's size propertys, so if I right click the
file
and select propertys I can see the width and the height of the image. But
if
I save the bitmap as a bitmap:

<<<<
saveBmp.Save(filename, ImageFormat.Bmp)
<<<<

this information doesn't get saved, is there something I can do about
this,
should I declare the bitmap in a specified format?

I already found the answer while typing this post but I'm still going to
post it because maybe it's useful for someone else. The solution is to
create the bitmap as follows:

<<<<
saveBmp = new bitmap (width,height, PixelFormat.Format24bppRgb)
<<<<

Nov 21 '05 #2
Thnx for pointing that out for me Cor, it won't happen again, my you can
help me with my next question, look at the post with bitmap resize as
subject
thnx Peter
"Cor Ligthert" <no************@planet.nl> wrote in message
news:#R**************@TK2MSFTNGP12.phx.gbl...
Peter,

When you have the answer this is not a good post, this will be opened again and again because somebody is thinking you have a question, therefore this
message.

When you do this the least you have to do is to tell in the subject that it is not a question.

Cor

"Peter Proost"
Hi group when save a bitmap called saveBmp like this:

<<<<
saveBmp.Save(filename, ImageFormat.Jpeg)
<<<<

the bitmap gets saved with it's size propertys, so if I right click the
file
and select propertys I can see the width and the height of the image. But if
I save the bitmap as a bitmap:

<<<<
saveBmp.Save(filename, ImageFormat.Bmp)
<<<<

this information doesn't get saved, is there something I can do about
this,
should I declare the bitmap in a specified format?

I already found the answer while typing this post but I'm still going to
post it because maybe it's useful for someone else. The solution is to
create the bitmap as follows:

<<<<
saveBmp = new bitmap (width,height, PixelFormat.Format24bppRgb)
<<<<


Nov 21 '05 #3

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

Similar topics

1
by: someone | last post by:
Please bear with me, since I'm an ASP guy, and not a .NET guy. On my site, I dynamically resize/resample images so they're not too large. GetThumbnail resulted in very poor quality, so I create a...
9
by: Mark Johnson | last post by:
How can you save all or a portion of the Grafics object to a Image/Bitmap ? I am try to save the Images from Cards.dll to a BitMap file. I can read in the Images to the Grafics, but when I try this...
0
by: CroDude | last post by:
Hi all! I have problems when writting bitmap to a byte array and after reading it back form byte to Bitmap object. What I do is this: First I throw Bitmap to a memory-stream and then I write it...
2
by: active | last post by:
I find Bitmap.Save works for WMF files but Bitmap.FromFile does not. If I use FromFile on a WMF file that came with VS I get an exception. If I use it on a WMF file created with Bitmap.Save I...
6
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: ...
8
by: Nathan Sokalski | last post by:
I am trying to write code to rotate a graphic that I have. Here is the code I am currently using: Dim frogbitmap As New Bitmap(Drawing.Image.FromFile(Server.MapPath("images/frog.gif"))) Dim...
7
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
12
by: tjonsek | last post by:
I get a generic error (not very helpful) when attempting to save a re-sized image back to its original location. Here is the code snippet: Dim g As System.Drawing.Image =...
3
by: Samuel | last post by:
I need to read a tiff Image and change it slightly. Currently I create a bitmap then I draw the original image and do the changes. Since the tiff is very large in size the bitmap takes a huge...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.