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 HEIC/HEIF/TIFF #365

Merged
merged 5 commits into from
Oct 12, 2022
Merged

Add support for HEIC/HEIF/TIFF #365

merged 5 commits into from
Oct 12, 2022

Conversation

pulsejet
Copy link
Member

Convert all images to JPEG and downscale before passing to node

#233 #111

pulsejet and others added 2 commits October 10, 2022 15:29
Convert all images to JPEG and downscale before passing to node

Signed-off-by: Varun Patil <[email protected]>
@marcelklehr
Copy link
Member

@pulsejet Thanks a lot! Would you allow me to push some commits?

@pulsejet
Copy link
Member Author

@marcelklehr of course! I think you already should be able to.

$imagick = new \Imagick($path);
$imagick->scaleImage(4096, 4096, true);
$dimensions = $imagick->getImageGeometry();
if ($dimensions['width'] > 4096 || $dimensions['height'] > 4096) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Imagick before 3.0.0 used to leave the image untouched if it was smaller than the specified scaling; I didn't know the behavior had changed.

@marcelklehr marcelklehr merged commit 1b0db65 into nextcloud:master Oct 12, 2022
@pulsejet pulsejet deleted the patch-heic branch October 12, 2022 20:27
@pulsejet
Copy link
Member Author

Thank you @marcelklehr! 🎉

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.

None yet

2 participants