Image from a 1x1Byte[] .NET Object
Show older comments
Hello,
So I get a 1x1 Byte[] called imageHandle that is meant to hold a bitmap image (I believe it's meant to be a 448x501x3 uint8 variable). However when I run the following code:
uintVar = uint8(imageHandle);
I get ans = 1x897832 uint8.
Is there some sort of function I should be running in arrange these bits into a viewable image?
I have attached the uintVar.mat file, was not able to attach the imageHandle variable as matlab doesn't load .NET objects from a .mat file.
6 Comments
Walter Roberson
on 14 May 2020
it appears to have a 40 byte header and 4 bytes per pixel, such as rgba
Walter Roberson
on 14 May 2020
Edited: Walter Roberson
on 14 May 2020
Nom
on 14 May 2020
Nom
on 14 May 2020
Walter Roberson
on 14 May 2020
There is no such thing as a device-independent bitmap, not really. bitmaps are inherently raster oriented, and that makes them device dependent. .bmp are not device independent either. Device independent is a pain to do.
If you had color information that was device-independent then when properly rendered it would appear as the same color on all displays, even if they used different display technologies such as CRT vs LCD vs LED. If the stored information does not have a gamma map and color temperature information (better yet, spectral illumination information) then it is not device independent.
Anyhow, the .mat file did not get attached :(
Nom
on 14 May 2020
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!