question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Use Image.write_to_target to write a tif

See original GitHub issue

Dear pyvips developers,

I was playing with Image.write_to_target and was wondering how to write pyramidal tifs:

import fsspec
import pyvips

with fsspec.open_file("s3://mybucket/file.tif", mode="wb") as buffer:

    target = pyvips.TargetCustom()
    target.on_write(buffer.write)
    target.on_finish(buffer.close)

    image.write_to_target(
        target, ".tif",
        pyramid=True,
        tile=True,
        compression="jpeg",
    )

but I get the following error:

Error: unable to write to target
  VipsForeignSave: ".tif" is not a known target format

Are there plans to create a tiffsave_target extension?

Cheers, Andreas 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jcupittcommented, Aug 9, 2022

This feature is in libvips 8.13. I’ll close.

1reaction
kleisaukecommented, Feb 24, 2022

https://github.com/libvips/libvips/discussions/2051 also includes some details on how the other loaders/savers were reworked for the source/target API.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write tiled output of TIFF, using ImageIO in Java - Stack Overflow
This works just fine, however the image writer is always calling getData and requesting rows of data. It seems to me I should...
Read more >
What are TIFF files and how do you open them? - Adobe
A TIFF, which stands for Tag Image File Format, is a computer file used to store raster graphics and image information. A favorite...
Read more >
What are TIFF Files, and which programs can open them?
List of Software that Can Create and Open TIFF Files. TIFF (Tagged Image File Format) is a raster graphics file format used for...
Read more >
Write entire image - MATLAB write - MathWorks
This MATLAB function writes imageData to TIFF file associated with the Tiff object t.
Read more >
TIFF, Tag Image File Format, FAQ - AWare Systems
Question 5. Is the TIFF specification being maintained and updated? Question 6. Do I need a license from Adobe or anyone else to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found