Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am writing an experimental project in VB.net to modify the colour data in a picture.
I've finished the simple version using BMP file and now want to add JPEGs

If I'm right- JPEG compression reduces the colours slightly and then reduces file size by storing the colour data with a pixel count i.e. "red" x 25 (the simple version).

I'm not concerned with the compression method but only the colour values so I want to increase/decrease the colour value and avoid the pixel count value

Assuming I'm right in my supposition, can anyone help with the Image start point and the format of the image data.


Thanks in advance

Peter
Posted
Comments
Peter Gibbins 14-Oct-13 5:20am    
Zoltan - Sorry newbie, ny first question

I'm not sure your supposition is right... I believe the compression is considerably more complex than that - your method is a lossless compression, that isn't particularly efficient: jpg uses a Human vision system based around 8x8 blocks
image of process[^]
wiki description[^]
I suspect that if you want to do this, you are going to have to convert your jpeg to a bitmap, play with it, then convert it back - which will lose you image quality.
 
Share this answer
 
Comments
Peter Gibbins 14-Oct-13 5:16am    
Thanks for answering Original Griff

Yes - you're right. from what I read the JPEG compression uses the Discrete Cosine function which (if I understand the process) effectively compares pixels in successive 8x8 grids to produce a smooth "averaging" of the colours in that area to reduce the number of colours used which then allows the pixel count process to work. The "pixel count" is lossless, but the DCF process to reduce differing colours is lossy - the more so as you increase the compression.

I admit - trying to work the DCF without using pre-written libraries is way beyond my maths skills... So I want to attack the data store, avoid the complexity of the DCF function and just tinker with the colour values.

It may not work, but I'd like to try.

Hence, needing to understand the image data structure.

Peter
 
Share this answer
 

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