Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I read image data like width, height, exif ? #1243

Closed
klauskobald opened this issue Jun 12, 2023 · 1 comment
Closed

how do I read image data like width, height, exif ? #1243

klauskobald opened this issue Jun 12, 2023 · 1 comment

Comments

@klauskobald
Copy link

I do not want to change the image only read information. I am wondering that there is no functions for that. Or maybe I just cannot find them.

When I open the image I see all this information:

Jimp { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, bitmap: { width: 1918, height: 1348, exifBuffer: Uint8Array(93) [ 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 6, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 40, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 135, 105, 0, 4, 0, 0, 0, 1, 0, 0, 0, 62, 0, 0, 0, 0, 0, 2, 160, 2, 0, 4, 0, 0, 0, 1, 0, 0, 7, 126, 160, 3, 0, 4, 0, 0, 0, 1, 0, 0, 5, 68, 0, 0, 0, 0 ], data: <Buffer c0 c3 bc ff bd c0 b9 ff b9 be b6 ff b6 bb b3 ff b5 ba b0 ff b6 bb b1 ff b8 bc b2 ff b9 bd b3 ff b7 b7 ad ff b4 b4 aa ff b6 b1 a9 ff b7 b2 aa ff bd b4 ... 10341806 more bytes> }, _background: 0, _originalMime: 'image/jpeg', _exif: { startMarker: { openWithOffset: [Function: openWithOffset], offset: 0 }, tags: { PhotometricInterpretation: 2, Orientation: 1, ResolutionUnit: 2, ExifImageWidth: 1918, ExifImageHeight: 1348 }, imageSize: { height: 1348, width: 1918 }, thumbnailOffset: undefined, thumbnailLength: undefined, thumbnailType: undefined, app1Offset: 24 }, _rgba: true, writeAsync: [Function (anonymous)], getBase64Async: [Function (anonymous)], getBuffer: [Function: getBuffer], getBufferAsync: [Function: getBufferAsync], getPixelColour: [Function: getPixelColor], setPixelColour: [Function: setPixelColor], [Symbol(kCapture)]: false

Thanks

@klauskobald
Copy link
Author

oh sorry - just found out. I can access bitmap data directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant