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

save bitmap to jpg quality loss

Hi group I've got a bitmap with a white background in a picturebox and I do
some drawing on this bitmap but when I save the bitmap as .jpg there's some
quality loss, nothing you can see if you just open the picture. But if you
zoom in on it there are some lightgray pixels that should be white
(background color) , can I do something about this or do I just have to live
with it, that it's part of converting from bitmap to jpg

Grtz Peter
Nov 21 '05 #1
4 2697
Peter,

There will be almost forever quality loss when you use a compressed format.

That is why they changing it all the time and improve it.
(And Tiff is so huge)

Cor
Nov 21 '05 #2
That's what I thought, that I just have to live with it. But it isn't a big
problem, because it aren't very large images so the user can save them as
bmp. The problem with the gray pixels was that if they edit the picture in
paint for example and use the paint bucket it stops at a gray pixel. But
that realy isn't my problem, because my program hands the user a drawing and
if they want to edit it externaly it's their responsibility.

Thnx for your time Cor

"Cor Ligthert" <no************@planet.nl> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Peter,

There will be almost forever quality loss when you use a compressed format.
That is why they changing it all the time and improve it.
(And Tiff is so huge)

Cor

Nov 21 '05 #3
Peter,

"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Hi group I've got a bitmap with a white background in a picturebox and I do some drawing on this bitmap but when I save the bitmap as .jpg there's some quality loss, nothing you can see if you just open the picture. But if you
zoom in on it there are some lightgray pixels that should be white
(background color) , can I do something about this or do I just have to live with it, that it's part of converting from bitmap to jpg


That's due to JPEG compression. You can adjust the compression level to
minimize these artifacts:

<URL:http://groups.google.de/groups?selm=uvfKr3xSCHA.1960%40tkmsftngp09>

I suggest to use another image format, like PNG or GIF instead.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
Hi Herfried,

Thnx for the link, I'll check it out

Grtz Peter

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:ut**************@TK2MSFTNGP12.phx.gbl...
Peter,

"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Hi group I've got a bitmap with a white background in a picturebox and I

do
some drawing on this bitmap but when I save the bitmap as .jpg there's

some
quality loss, nothing you can see if you just open the picture. But if you zoom in on it there are some lightgray pixels that should be white
(background color) , can I do something about this or do I just have to

live
with it, that it's part of converting from bitmap to jpg


That's due to JPEG compression. You can adjust the compression level to
minimize these artifacts:

<URL:http://groups.google.de/groups?selm=uvfKr3xSCHA.1960%40tkmsftngp09>

I suggest to use another image format, like PNG or GIF instead.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5

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

Similar topics

6
by: charsh | last post by:
Hi, I using the code below to draw a text in a pictureBox1. //Start--------------------------------------------------------------- private void button1_Click(object sender, System.EventArgs e)...
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...
12
by: yaya via DotNetMonster.com | last post by:
Hi, I have a picture box with circles and rectangles, and I wana save all the images into a jpg file, i tried pictureBox1.Image.Save(@"c:\1.jpg"); but I got and error...
1
by: Fredrik Melin | last post by:
Hi, If I do a copy of a jpg picture to the clipboard. Then I do PictureBox1.Image = CType(IData.GetData(DataFormats.Bitmap), Bitmap) Then I save the Picture from the picturebox as jpeg. ...
2
by: Peter Proost | last post by:
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...
1
by: WB | last post by:
Hi, I have a helper class that has a method to resize images. It takes the virtual path of an image and resize it to a specified dimension like this. public void ResizeImageTest(string...
1
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
13
by: Joe | last post by:
does anyone know why this source code throws an error?? Dim myBitmap As System.Drawing.Bitmap Dim myGraphics As Graphics myBitmap = New System.Drawing.Bitmap(fileName:="C:\test.tif")...
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: 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...
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...
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,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.