I need some help.I want to know how encrypt the data into an image using java,
that is reading an image pixel by pixel and writing back the data pixel by pixel.
Are you talking about steganography? If so, searching for "steganography java" should find all kinds of code, e.g. DIIT on SourceForge. If you meant something else, please provide more detail.
Abstract — Several methods have been proposed for
encrypting images by shared key encryption mechanisms since
the work of Naor and Shamir. All the existing techniques are
applicable to primarily non-compressed images in either
monochrome or color domains. However, most imaging
applications including digital photography, archiving, and
internet communications nowadays use images in the JPEG
compressed format. Application of the existing shared key
cryptographic schemes for these images requires conversion
back into spatial domain. In this paper we propose a shared
key algorithm that works directly in the JPEG domain, thus
enabling shared key image encryption for a variety of
applications. The scheme directly works on the quantized DCT
coefficients and the resulting noise-like shares are also stored
in the JPEG format. The decryption process is lossless
preserving the original JPEG data. The experiments indicate
that each share image is approximately the same size as the
original JPEG image retaining the storage advantage
provided by JPEG compression standard. Three extensions,
one to improve the random appearance of the generated
shares, another to obtain shares with asymmetric file sizes,
and the third to generalize the scheme for n>2 share cases,
are described as well.
So this isn't about steganography, nor about compressing image files in general, but about a specific way to encrypt JPEG files that preserves certain characteristics of JPEGs even when encrypted. It also looks like the abstract of a paper about this topic that you could read to find out all the details. Do you have a specific question about this that isn't answered in the paper? This is rather arcance stuff, though, making it unlikely that anyone who hasn't read the paper would be able to answer questions.
hey,
sorry i am out for a while.
my doubt exactly is:
IN Proposed schemes...
A. Monochrome Images
The lossy version of JPEG image compression uses discrete
cosine transforms (DCT) [9]. A monochrome image is first
split into 8×8 non-overlapping blocks of pixels. An 8×8 DCT
is applied to each block and the resulting coefficients are
scalar quantized using a quantization matrix. The quantized
coefficients are then converted from a two-dimensional
representation to a one-dimensional vector by a process known
as zig-zag scanning and sent to an entropy coder that uses
either Huffman or arithmetic coding.
doubt:
how do i split an image into 8 by 8 pixels and convert them into 1-dimensional vector and i am in an idea of using the matlab
for computational purposes,can i use the end result in java?
I'm not sure how data exported from MatLab might be usable in Java, but I'm sure you can find detailed descriptions of the DCT and/or JPEG algorithms through Wikipedia and Google.