Skip to content
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

Add support for TIFF images on darwin #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmbfm
Copy link

@dmbfm dmbfm commented May 28, 2023

Since the default image format for the clipboard on macOS is tiff (that is, when you click "Copy Image" on any meny on macOS it will copy the image data in the TIFF format), it seems useful to add support for this in the clipboard_darwin.m file.

It is pretty simple: if the format is not PNG, we try to read TIFF; then, if successful, we convert it to a bitmap and, finally, to PNG. In this manner we return the same PNG data, and the user does not neet do modify his code at all.

Since the default image format for the clipboard on macOS is tiff (that
is, when you click "Copy Image" on any meny on macOS it will copy the
image data in the TIFF format), it seems useful to add support for this
in the `clipboard_darwin.m` file.

It is pretty simple: if the format is not PNG, we try to read TIFF;
then, if successful, we convert it to a bitmap and, finally, to PNG. In
this manner we return the same PNG data, and the user does not neet do
modify his code at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant