Comments (4)
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?
from pyvips.
Thanks @jcupitt for your reply.
png tile information:
Width 1280
Height 1280
Data type UInt16 - Sixteen bit unsigned integer
GDAL Driver Description PNG
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
from pyvips.
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
dzsave
like this:
vips dzsave x.tif x --suffix .png --tile-size 640 --overlap 320
And I see tiles like this:
$ vipsheader x_files/11/1_1.png
x_files/11/1_1.png: 1280x1280 ushort, 4 bands, rgb16, pngload
Which seems correct.
from pyvips.
Oh, do you want it to write 8-bit PNG tiles? You need to convert before dzsave
, perhaps:
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 random
? I think sequential
should work, even with very large overlaps, and will be much faster.
from pyvips.
Related Issues (20)
- Assertion failed: sp->cinfo.comm.is_decompressor HOT 3
- Help installing pyvips for jupyter HOT 5
- `TIFFFillTile: Read error` when writing a TIFF file on a per-tile basis. HOT 2
- Thumbnail creation taking too long HOT 2
- Unable to save images when certain combinations of them are resize()'d HOT 7
- pyvips stats HOT 1
- How does composite() merge colors? HOT 8
- ICC profiles from file stream in pyvips HOT 5
- Why is error 0x7f? HOT 1
- Can libvips' stack size be modified using pyvips? HOT 6
- Unable to convert multiband image to srgb HOT 9
- Downsampling in Z dimension HOT 10
- Issues with writing to SVS files HOT 7
- Is it possible to add attributes/methods to the Image class? HOT 4
- `vips_tracked: out of memory -- size == 59546MB` When Converting MRXS to DZI HOT 3
- Incorrect Color Interpretation in OpenSlide When Changing JPEG Q Factor in pyvips HOT 4
- Image stretching HOT 1
- Load openslide (.svs) form buffer? HOT 3
- Convenience methods for Pillow integration HOT 4
- Slice a huge tif fails - unable to call VipsForeignSaveTiffFile HOT 15
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 pyvips.