LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I Import a Jpeg and display the associated Hex data in a 2d Array?

I have a Hex Editor that I have downloaded and I wanted to recreate this in labview to enable me to automatically edit the data.
0 Kudos
Message 1 of 7
(3,347 Views)
Hi Pinki2k,

Yes you can. You can even edit the HEX data in LabView.

JLV
Message 2 of 7
(3,347 Views)
Hi Joe,
I currently have a number to hex converter and a hex integer string output attached to the flattened data output of a read jpeg data vi. Am I heading in the right direction?
The data that this seems to be giving me does not match the outputs for the hex editor.
Any help is appreciated as my knowledge is limited,
thanks in advance.
0 Kudos
Message 3 of 7
(3,347 Views)
Hi Pinki2k,

I don't know if you are going in the right direction, but it sounds like it... Now we need to work on "refinements".. ;o)

You may not need to conver the number into HEX, because it may be a case of representation.. (visual)

Here's how you can check to see if your data is in the correct format.

Within the block diagram, use the wiring tool to wire indicators (right click > create > indicator) at each point where you manipulate the data (convert to hex, etc).

Go to the front panel. Right-click on the indicators and select "Format & Precision". Then select "hexadecimal". Then verify that the display is similar to that in your hex editor. It should match directly from the point where you read your file, because the bi
nary (in it's raw visual form) is an ASCII representation of the HEX data. So display it as HEX.

That's the first step.

After you are happy that you are dealing with the correct data, you can change the type to something useful that you can manipulate. Changing type is done by TypeCasting. You take the icon and feed (left) the array. You wire the type to the top.. (and I mean wiring the type as in if you want numeric, you go into the Functions Palette under Numeric and wire the integer -0-). The output is the array in the type desired... LV lacks proper description of this function...

Let me know how it goes..

-JLV-
0 Kudos
Message 4 of 7
(3,347 Views)
Cheers Joe,
it seems to be working how it should except that the data I require from the jpeg is in a header and seems to be stripped off when the file is open.
Can I get my hands on this information prior to it being removed?
0 Kudos
Message 5 of 7
(3,347 Views)
You should be able to read the header as part of the data.... strange...

Do you see the header in your hex editor?

I also have to read the header information and modify or create the header for binary files... It works quite well.

If you can't read it (you should...) then can you "create it" ?

I don't understand why the info is removed...

take care,

JLV
Message 6 of 7
(3,347 Views)
Did you put an offset when you read the file?
0 Kudos
Message 7 of 7
(3,347 Views)