473,396 Members | 2,070 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,396 software developers and data experts.

Desperately needing direction with EncoderParameters and saving images under different compression/quality schemes

Hello,

I am a VB.NET programmer and I have a JPEG image file (from digital
camera) of about 109 KB's in size, when I open it and save it
(without making any alterations at all, just going to File --> Save) in
MS Photo Editor, the file is automatically shrunk in size to 81 KB's.
When doing the same thing in MS Paint, the file is shrunk to 54 KB's.
The file has the same number of pixels after both saves (as expected).
My question follows...

What are the 'automatic' changes that typical image editing
software products perform to our images APART from any changes or
alterations that we may make ourselves?

I understand that one of these would be some form of compression (say,
at 90) but I am unfamiliar with the other types of alterations that are
made. When I compare the pixels in the original file and the new saved
file (even without making changes, just opening & saving the file) I
get completely different RGB values in each pixel. This is really bad,
since (in my application) I need to be able to predict all typical (non
explicit) changes made by graphics programs to normal images. So I have
tried compressing the images via .NET code (EncoderParameters etc) at
all possible values, 100, 99, 98 etc all the way down to 0 and I can
not reproduce the exact pixel arrangements imposed by MS Photo Editor.

My question is, why can't I, and what other types of transformations
do I need to look into in order to try to replicate (and predict) such
different pixel RGB values/arrangements imposed by various graphics
programs? I don't know much about JPEG so not sure what
ChrominanceTables and Luminance values are. The only thing I've tried
altering is the Encoder.Quality parameter, and this accepts only
parameter values between 0 and 100 of Long (Int64) data type. So in
addition, can't I specify 89.5 or 94.3 (non integer) type values? Is
this not in the JPEG spec to accept decimal values or is the .NET
framework just limited in this way? Because I'm wondering, maybe
these other software applications are specifying decimal fractions for
the Quality setting of the encoder.

So, in summary, just need to know...
1). What types of 'automatic changes' typically occur when an image
is opened & saved using typical graphics programs?
2). If it is possible to pass non integer values floating point values
(Single/Double/Decimal etc) for the Quality setting in the
EncoderParameter object?

I've had too many headaches because of this, Microsoft documentation
is really bad, I understand my purposes may sound uncommon but I really
need to be able to understand the types of automatic changes that are
occurring, thank you in advance. I will respond promptly to all input,
anything would be appreciated at this stage since I'm really empty
direction wise.

Thank you.

Apr 30 '06 #1
1 1483
NutsAboutVB.

If you really need deeper help about drawing, than the dotnet drawing
newsgroup is probably the best place to go.

microsoft.public.dotnet.framework.drawing

I hope you find your answers soon

Cor

"NutsAboutVB" <de*@sms-networks.com> schreef in bericht
news:11*********************@j33g2000cwa.googlegro ups.com...
Hello,

I am a VB.NET programmer and I have a JPEG image file (from digital
camera) of about 109 KB's in size, when I open it and save it
(without making any alterations at all, just going to File --> Save) in
MS Photo Editor, the file is automatically shrunk in size to 81 KB's.
When doing the same thing in MS Paint, the file is shrunk to 54 KB's.
The file has the same number of pixels after both saves (as expected).
My question follows...

What are the 'automatic' changes that typical image editing
software products perform to our images APART from any changes or
alterations that we may make ourselves?

I understand that one of these would be some form of compression (say,
at 90) but I am unfamiliar with the other types of alterations that are
made. When I compare the pixels in the original file and the new saved
file (even without making changes, just opening & saving the file) I
get completely different RGB values in each pixel. This is really bad,
since (in my application) I need to be able to predict all typical (non
explicit) changes made by graphics programs to normal images. So I have
tried compressing the images via .NET code (EncoderParameters etc) at
all possible values, 100, 99, 98 etc all the way down to 0 and I can
not reproduce the exact pixel arrangements imposed by MS Photo Editor.

My question is, why can't I, and what other types of transformations
do I need to look into in order to try to replicate (and predict) such
different pixel RGB values/arrangements imposed by various graphics
programs? I don't know much about JPEG so not sure what
ChrominanceTables and Luminance values are. The only thing I've tried
altering is the Encoder.Quality parameter, and this accepts only
parameter values between 0 and 100 of Long (Int64) data type. So in
addition, can't I specify 89.5 or 94.3 (non integer) type values? Is
this not in the JPEG spec to accept decimal values or is the .NET
framework just limited in this way? Because I'm wondering, maybe
these other software applications are specifying decimal fractions for
the Quality setting of the encoder.

So, in summary, just need to know...
1). What types of 'automatic changes' typically occur when an image
is opened & saved using typical graphics programs?
2). If it is possible to pass non integer values floating point values
(Single/Double/Decimal etc) for the Quality setting in the
EncoderParameter object?

I've had too many headaches because of this, Microsoft documentation
is really bad, I understand my purposes may sound uncommon but I really
need to be able to understand the types of automatic changes that are
occurring, thank you in advance. I will respond promptly to all input,
anything would be appreciated at this stage since I'm really empty
direction wise.

Thank you.

May 1 '06 #2

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

Similar topics

5
by: news.west.cox.net | last post by:
I have a fairly simple Python program that uses Image and ImageDraw to create poll results on the fly. Because PIL only supports 256 colors for GIF and BMPs are huge (in comparison)... I have...
0
by: mchl gdbt | last post by:
Hi, I have several thousand tiffs generated by application A which are read by application B. I need to remove a few colours from the tiffs and I decided to try with the python imaging library....
4
by: Dom Hicklin | last post by:
I have created a form onto which images can be dropped and thus added to the OLE field of a Table (Access 2000 linked to SQL 2000 server). I use the Stephen Lebans ExportOLE function to do this...
2
by: darrel | last post by:
I have written an image upload/resize tool that then saves out the image as either a JPG or GIF. I got the JPG save working nicely, using a codec and setting the compression to 90%. However,...
2
by: Kim Bach Petersen | last post by:
Using asp.net, I'm generating bitmaps, that I stream either as gif- og jpg-images (se code below). In both cases, the image-quality is rather poor: ...
6
by: NutsAboutVB | last post by:
Hello, I am a .NET programmer and I have a JPEG image file (from digital camera) of about 109 KB's in size, when I open it and save it (without making any alterations at all, just going to File...
7
by: pamela fluente | last post by:
I have been using something like: public void SaveJPG(Image Image, string FileName, long QualityLevel_0_100, long ColorDepthLevel) { ImageCodecInfo ImageCodecInfoJPG =...
3
by: salmobytes | last post by:
Every img tag (<img src="xxx.jpg">) in the html source represents a separate GET roundtrip between client and server, no? What about background images in css? I'm starting to see more and more...
2
by: almurph | last post by:
Hi, Hope you can help me wit this one. I have to open either a ".jpg", ".bmp" or a "gif" and alter its dimensions and save the output as a .gif. Here is my attempt - I would greatly...
0
by: ruthruth | last post by:
Wished to know in detail abt the below 1-what are the various compression strategies designed specifically for XML data.? 2- comparison between AXECHOP AND TREECHOP techniques to other XML...
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: 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,...
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,...

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.