[Image Encryption + Decryption = Smaller Image?]

Hey JGO, I’ll Start this post off by saying that I’ve never really messed around with creating/recreating Buffered Images via pixel data before.
(So maybe this is a common ordeal?) :o

I was bored today :emo:, and decided to make a program that would:

A: Scan a Image, get the pixel data.
B: Export the recreated Image b[/b].
C: Encrypt the recreated Image (.IDX / .DAT).
D: Export the decrypted image (.IDX > .JPG).

The Image that I’m using: (rather large)
http://edmullen.net/test/imagefiletest.php

Somehow during this process after I recreate the Image via the decrypted file’s data, it reduced the size dramatically?
No Image Quality / Pixel Data Loss.


< Input
(Original.jpg) 5,826 kb (3264x2448)
> Output
(Initial-encrypt.jpg) 5,826 kb (3264x2448)
(Initial-decrypt.jpg) 966 kb (3264x2448)
Finished...!

Is Java doing something that I’m missing? :expressionless: :expressionless:

http://bn1files.storage.msn.com/y1maMIcxlZqpqi9geEF7st8b-rUL7zo7Ckx4p2LdbQ17oSt7cGE9a6DpQCilttblgRH62Bt8hxqgi7RtBnvw4KEKw

Or did I just make a new tool?

just to be sure have you actually done a per pixel comparison to confirm no difference between the two images?

One second I’m scanning and comparing them.
7,990,272 pixels O.O will it be a while? :emo:

EDIT: No pixel loss what so ever was the result ;D

Is java doing something that you’re missing? Probably not.

What happens is whatever is written in the code. Since I can’t see the code I’ve no idea.

Most likely it does exactly what you said. It scans the pixel data and recreates the image. Scraping off all other “unnecessary” bytes from the original. I’m not too familiar with the different image standards but I imagine it’s more or less like converting a jpeg into a png image.

Why the size difference is so significant I don’t know since, as I said, I’m not familiar with the jpeg standard in detail.

Could be that the original jpeg has other stuff compressed within than just pixel data, try extracting it.

JPEGs can store a lot of ordinary non-pixel data. Comments and other EXIF data for example. Progressively loading images store more information than non-progressive images. That image apparently also has its own color profile built into it (though I don’t know what that means.) Saving it in another program seems to strip data the same way. I got the file size down to 2MB simply by doing that.