Click here to Skip to main content
15,891,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What I do (in DotNet VisualBasic):
1. Load an image into a bitmap
2. Make changes to it using the graphic object (draw some circles)
3. Show the modified bitmap in a picturebox on a windows form
4. Save the bitmap as a jpg-file using the Bitmap.Save method
5. Open the saved bitmap in the Windows Photo Viewer

The problem then is:
The image shown in the picturebox step 3 is much more saturated/brighter then the imnage shown in the Windows Photo Viewer in step 5.

I want them to be the same.

Does anyone know a solution to this problem?

What I have tried:

I tried to solve the problem by copying the metadata from the sourcefile to the destination file. But that made no difference.

I think that the problem is to be found in the way the picturebox shows the bitmap.
Posted
Comments
[no name] 30-Oct-20 14:46pm    
If you convert between bitmap, jpg, png and different color depths, you'll see differences. If something has an effect you don't want, don't do it.
Frank Klaassen 30-Oct-20 15:59pm    
Perhaps I was not clear in what I asked. The problem is that the same bitmap shown in the picturebox is more saturated then shown in the Windows Photo Viewer.
Alan N 30-Oct-20 16:35pm    
Shouldn't you reverse the order of steps 3 and 4 so that the saved bitmap is displayed by the PictureBox and the Photo Viewer?
Frank Klaassen 30-Oct-20 16:49pm    
Thank you for your reply Alan, but the problem is that the image shown in the picturebox is edited by the user. When the user save the file it must be the same as shown in the picturebox.

Even, when the image is shown in the picturebox, and I do a windows printscreen and paste the result in paintnet, then the result shown in paintnet is also less saturated. So there is something "going on" in the picturebox.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900