Comments (4)
I think this image might be slightly corrupt (there are quite a few unknown TIFF tags) and/or have invalid/unexpected data.
This is likely to relate to bit depth - the image claims to be 16-bit but contains what appears to be 8-bit values.
Depth: 16/8-bit
Channel depth:
gray: 8-bit
Using vips
at the command line, the maximum pixel value is only 161. I would expect this to be 65535.
$ vips max 澳门WGS84.tif
(vips:21878): VIPS-WARNING **: 12:40:10.974: Unknown field with tag 33550 (0x830e) encountered
(vips:21878): VIPS-WARNING **: 12:40:10.974: Unknown field with tag 33922 (0x8482) encountered
(vips:21878): VIPS-WARNING **: 12:40:10.974: Unknown field with tag 34735 (0x87af) encountered
...
161.000000
Do you know the source of this image e.g. which software was used to create it?
from sharp.
@lovell Thanks!
I can use your method to convert TIF to digits and browse PNG thumbnails normally
I use the Python OpenCV library to implement it
The code is as follows
import
cv2
image_16bit = cv2.imread('am.tif', cv2.IMREAD_UNCHANGED)
image_8bit = cv2.normalize(image_16bit, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U)
cv2.imwrite('am2.tif', image_8bit)
But I cannot effectively convert TIF files to 8-bit using Sharp
Can Sharp find a way to solve the conversion problem?
from sharp.
from sharp.
reply “Do you know the source of this image e.g. which software was used to create it?“
This TIF image is DEM digital elevation data captured by Advanced Land Observing Satellite 1
https://search.asf.alaska.edu/#/
from sharp.
Related Issues (20)
- Sharp Error 'Input Buffer is empty' after dockerize Nestjs App HOT 2
- Write custom tags into EXIF data HOT 1
- Windows: support info.size on wide-character systems (a.k.a. the C++17 upgrade) HOT 2
- RangeError: Maximum call stack size exceeded. HOT 7
- Using a custom libvips when upgrading to 0.33.x requires node-addon-api HOT 4
- Missing executable at MAS build with electron-builder HOT 13
- rotate() and extract() do not rotate certain pictures properly (bad extract area) HOT 11
- package 'vips' requires 'libhwy >= 1.0.5' but version of libhwy is 1.0.4 HOT 4
- latest 0.33.2 causes Next.js build error on Vercel build (RangeError: Maximum call stack size exceeded when collecting build traces) HOT 2
- Deployment error in render HOT 3
- become slow (x8) when deployed on el cheapo hosting company server HOT 6
- 0.33.2 breaks nextjs Vercel builds HOT 1
- Could not load the "sharp" module using the win32-x64 runtime || HOT 2
- Upgrading sharp from `0.33.1` to `0.33.2` breaks Next.js build on Vercel HOT 2
- facing issue while installing sharp package HOT 1
- facing issue while installing sharp package HOT 2
- "Maximum call stack" error in Vercel when upgrading from 0.33.1 to 0.33.2 while using Next.js HOT 2
- Emojis not rendering with sharp, but they do with `vips text` or `pango-view` HOT 7
- Error: Could not load the "sharp" module using the darwin-arm64 runtime HOT 3
- Very large 333333x333333 SVG input image will exceed 32767x32767 pixel limit when scaled to 250x250 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharp.