-
Notifications
You must be signed in to change notification settings - Fork 50
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
creating tiles of 16bit multiband (4 band) tiff image leaves black canvas #466
Comments
Hello @Rjaat, I'd guess your TIFF is not using 0-65535 for black to white. When it's converted to 8-bit PNG, it looks black but isn't. You'd need to share a sample source image before anyone could say more. Are you sure you need that huge overlap? |
Thanks @jcupitt for your reply. png tile information:
While making chunk of 4 band 16bit images the png tiles also generated in 16bit format which is not being rendered by openseadragon viewer. The same is also true when I have 3 band 16 bit image. In another scenario where I have 8 bit RGB images everything works fine. Yes, we need 50% overlap in our scenario |
As I said, it seems to work for me. You need to share a sample image so I can try to reproduce your problem. For example, I can take this sample RGBA image: Make a 16-bit, four band TIFF like this: vips colourspace biglion.png x.tif rgb16
vips dzsave x.tif x --suffix .png --tile-size 640 --overlap 320 And I see tiles like this:
Which seems correct. |
Oh, do you want it to write 8-bit PNG tiles? You need to convert before image = pyvips.Image.new_from_file(image_path, access='sequential')
image \
.colourspace('srgb') \
.dzsave(
"basename", # Base name for the output files
suffix=".png", # Sets the format of the tiles; use '.jpg' for JPEG tiles
overlap=320, # The overlap between tiles; adjust as necessary
tile_size=640 # The size of each tile in pixels
) Are you sure you need |
I have a 4 band 16 bit tiff image and trying to create .png tiles of that image using below code:
in the process, tile gets created but they comes with black canvas.
same approach works fine with 8bit RGB images.
anyone who faced the similar issue, or have any suggestion..... help please!!!
Thanks in advance
The text was updated successfully, but these errors were encountered: