I need to get DCT-coefficients array after quantization for further changing bits (steganography). My question is: Lets say, i have jpeg image in picturebox or whatever. How can i acess to dct coef. of this image using C# and library like LibJpeg.Net? Need a code pls. Can't find anything complete and simple on whole web. Also, can't see any tutorial on LibJpeg.Net.
After this steps:
BitMiracle.LibJpeg.Classic.jpeg_decompress_struct oJpegDecompress = new BitMiracle.LibJpeg.Classic.jpeg_decompress_struct();
System.IO.FileStream oFileStreamImage = new System.IO.FileStream(strImagePath, System.IO.FileMode.Open, System.IO.FileAccess.Read);
oJpegDecompress.jpeg_stdio_src(oFileStreamImage);
oJpegDecompress.jpeg_read_header(true);
BitMiracle.LibJpeg.Classic.jvirt_array<BitMiracle.LibJpeg.Classic.JBLOCK>[] JBlock = oJpegDecompress.jpeg_read_coefficients();
what should i do now, to edit dct coeff? Use .Access()
? How do i use this? Any examples?
Following:
short[] block = JBlock[c].Access(x, y);
gives an error like that: "Cannot implicitly convert type 'BitMiracle.LibJpeg.Classic.JBLOCK[][]' to 'short[]'"
Also, while using something similar, it gives an error about converting "BitMiracle.LibJpeg.Classic.JBLOCK[][]" to type "System.IConvertible".
Or maybe someone knows another easy way for my problem?