Android RBG image file to CMYK image File - android

I have many images in RGB format. I need to convert them to CMYK format and save them (no need to display the CMYK image on screen) to a file. I found many answers for converting RGB value to CMYK value but I dont know what to do with those CMYK values.I need to convert the whole RGB file and save it as CMYK file. How do I do that ?

Related

Android : Save jpeg image without compression

I'm trying to build an image steganography android app to hide information in jpeg images.
I'm encoding the information in the DCT Coefficients of the image.
I'm using OpenCv to perform the following steps :
Load image bitmap and get image mat from it.
Convert image from RGB to YCrCb
Divide the image into blocks of 8 x 8 blocks.
Center pixel values around 0 [0-255 => -128-127]
Apply DCT transformation to get DCT coefficients for the block.
Quantization [divide the DCT coefficients with quant matrix]
Now substitute the LSBs of the non 0/1/DC coefficients with our secret message.
inverse quantization
inverse DCT
[0-255 <= -128-127]
YCbCr to RGB
Get bitmap from image mat
Save the bitmap as jpeg.
The idea is that since I'm just extracting and repacking a jpeg image using jpeg compression algo, the jpeg compression algorithm should not destroy the data in the DCT coefficients (a lot of jpeg there :P)
Problem :
The data I just saved in the LSB of DCT coefficients gets destroyed int the 12th step. I want a way to save the image without its data being destroyed (which should be theoretically possible since I have followed the jpeg compression algorithm only.
Somethings I have tried :
this is the normal method, which leads to dataloss.
I used this method. It does not destroys the data, but it increases the file size by around 6 times and the final file received is not jpeg, it is pure bytes (which can be viewed in image viewer if the extension is set to jpeg or png)
I thought that the jpeg image I used might have a different level of compression as compared to the one while saving the jpeg image by android. So I used the image saved by the app to hide data. Even in that a lot of data is lost(less compared to before).
saving the image as png. This works, no data is lost and dct algorithm can be applied to extract the hidden information. But the point was to get a jpeg image as output, bcz jpeg is the most common image extension out there.

how to construct image from hex values/strings

I have a text file in sd card named file.txt which contains a hex values of a JPG image.
These values is received from a hardware camera. Now i have to read this text file from sd card and then need to construct a JPG image from these hex values.
I tried over 1 week but couldn't able to construct the JPG image.
Can anyone help me???
N:B: My camera is "LinkSprite JPEG Color Camera"

How to find hexadecimal array for a font to draw it on bitmap

I have a bitmap surface with RGBA8888 format that I can draw image on. Now, I would like to add some letters to the image. I figure, I need a font which is stored in RGBA8888 bitmap format. I then need to load the font into memory and choose the letter to display from the font and then write it to bitmap. But How can I find or extract RGBA8888 arrays for a font from TrueType font or any other format?

Show Tiff format image in Android

I am using ImageView to showing the .tiff formatted image, but I am getting error of NullPointerException.
I am converting the image file into byte array and then setting it in ImageView.
How can I show this tiff file?
You cannot set the tiff image on a ImageView in android directly. http://code.google.com/p/tiffonandroid/source/browse/ this is a sample tiffviewer. This might help you
Tiff has images stored as rows of bytes starting at defined offsets. So you can easily retrieve single rows to build the full image.
If you open any tif file in hex editor you will see that first 4 bytes mark tiff by code. And next 4 bytes give offset for metadata about tif image.
Use random access file to open image tif file, then seek the offset and you land into metadata space.From here you can pick offset of required image rows. Then go and get it..
If we needed full load of image like jpeg or BMP, then collect and combine all these rows after decompression, if any. Then you will get the full image

conversion of jpeg to svg in android

I want to know how to convert jpeg files to svg files in android?
Thank you in advance. Or can I convert pdf into svg format?
JPEG is a raster/bitmap format. SVG is a vector format. Going from bitmap to vector is not a trivial task, as a vector format describes shapes and attributes in an XML format. At the very best, a vector representation of a bitmap would be wildly inefficient.
Perhaps you can give an idea of what you are trying to do, and someone can help with the larger problem?

Categories

Resources