How to know the width and height of an Image?
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
Hai! I have byte array of an image (Image can be .bmp or .jpg or .jp2) Now how can i know the width and height of the image present in byte array? Thanks!
-
Hai! I have byte array of an image (Image can be .bmp or .jpg or .jp2) Now how can i know the width and height of the image present in byte array? Thanks!
BYTE *pImage = new BYTE[4000];
there is no width and height of a byte array. if the byte array holds image pixels, then whoever gives you the byte array will also have to tell you the image dimensions. if the byte array holds an encoded image file, then you will have to decode/parse the format.