Results 1568 comments of John Cupitt

Oh wait, I've found a bug, the page-height argument in tiffsave isn't handled correctly, sorry. As a workaround, set page-height in the image metadata instead. Try this: ```python final_image.set_type(pyvips.GValue.gint_type, "page-height",...

Sorry, my fault again, you need: ``` final_image.write_to_file(final_stack_filename, subifd=True, pyramid=True) ``` Enabling subifd mode doesn't automatically enable pyramid creation. I'll change this, it's confusing. Yes, `tiffsave` is the operation that...

This test prog runs successfully: ```python #!/usr/bin/python3 import os import pyvips # make test dataset ... 8 images, uint16, each 500 slices slice = pyvips.Image.black(2048, 2048).cast("ushort") stack = pyvips.Image.arrayjoin([slice] *...

I've updated libvips master to wire up the `page_height` param for tiffsave, and to automatically enable pyramid mode if subifd is set.

> Ok, I'm still trying to figure out why it produces a bigger stack for some reason Bigger in what way? A larger file size, or more pixels? libvips 8.11...

Here's a prog that makes a more manageable test image: ```python #!/usr/bin/python3 import os import pyvips # works well for black images compression = "lzw" # full size dataset #width...

For the full image, you'll need to set `image-description` to the OME XML, I expect you know.

> By using the code snippet I posted above (which basically uses your logic but using my dataset), the final stack size (merging everything together) ... is 4080. Wow, that's...

I was unclear: the width and height of every slice in a stack needs to be the same. Do all of your 8 stacks have fixed 2048 x 2048 slices?...

I think there's some confusion over terminology, here's a summary: - **format** -- The numeric type of a pixel. Yours are unsigned 16-bit integers, I think. - **slice** -- A...