06-24-2020 03:53 AM
Hello everyone,
can anyone guide me to convert image file into a .raw file?
06-24-2020 04:01 AM
Hi yash,
@yash612 wrote:
can anyone guide me to convert image file into a .raw file?
Rename the file to use the suffix ".raw" - in LabVIEW you can use the Move function in the file functions palette…
When you need better/more specific answer you should provide more specific information on your problem!
Let's start with your definition of a ".raw file"!
06-24-2020 04:16 AM
Thank you GerdW !!
Actually I am trying to decode some labview code. In this code they select .raw image file and then Read binary data from that. So I want to know how to convert image file into .raw file format.
06-24-2020 04:24 AM
Hi yash,
@yash612 wrote:
Actually I am trying to decode some labview code. In this code they select .raw image file and then Read binary data from that.
From what can be seen in this tiny code part "they" try to load an array of 1600×1200=1.92M bytes. It seems "they" load grayscale data (or image data with known palette).
Why don't you ask "them" when "they" know what "they" are doing?
@yash612 wrote:
So I want to know how to convert image file into .raw file format.
You need to convert your image data into a grayscale image of 1600×1200 pixels, then just save the pixel values as bytes to a ".raw" file…
06-24-2020 04:36 AM
HI GerdW,
thank you very much sir!!
06-24-2020 05:32 AM
Your information is very sparse. RAW is not a specific format but can be anything the developer wants. Each camera manufacturer uses for instance its own version of a raw file format (if the camera supports it at all).
A raw file consists usually of some application specific binary header that specifies things like height and width of the image, pixel format and all such things. Then the raw data is followed in uncompessed or lossless compressed form, which has to be interpreted according to the header information. So unless you have a good specification of the raw format in question a raw format file is simply a gibberish of bytes.