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

Comments on some functions in Sub-Graphics.php #6890

Closed
VBGAMER45 opened this issue Jul 28, 2021 · 5 comments · Fixed by #7355
Closed

Comments on some functions in Sub-Graphics.php #6890

VBGAMER45 opened this issue Jul 28, 2021 · 5 comments · Fixed by #7355
Milestone

Comments

@VBGAMER45
Copy link
Contributor

Ran into an issue today in a gallery modification which created thumbnails.
Issues were with thumbnails for bmp images were not working. I checked some of code and notified a couple things.

First the createThumbnail($source, $max_width, $max_height) function does have a way to set the preferred format ie gif,jpeg,png
I would suggest another parameter for that. In my case had to create my own version of that function to do it correctly.

Next the function
function resizeImageFile($source, $destination, $max_width, $max_height, $preferred_format = 0)

Has notes that say the preferred format (0 to use jpeg, 1 for gif, 2 to force jpeg, 3 for png, 6 for bmp and 15 for wbmp)
But yet does not have code to do so. Only has options for gif,png and jpeg which is the default.
imagebmp and imagewbmp functions are not included and not an option.
Would suggest either to add support for those image functions. Maybe future proof with support for imagewebp as well.

I would tag this for after final probably though.

@Sesquipedalian Sesquipedalian added this to the The future milestone Jul 28, 2021
@albertlast
Copy link
Collaborator

About the webp support see #6271

@Sesquipedalian Sesquipedalian modified the milestones: The future, 2.1.1 Jul 29, 2021
@Sesquipedalian
Copy link
Member

I don't see a lot of need to support BMP for thumbnail images. The whole point of thumbnails is to save bandwidth, after all, so why on earth would anyone store them in BMP format?

The second part of this issue makes sense to me, though.

@Sesquipedalian
Copy link
Member

Sesquipedalian commented Mar 2, 2022

Please test to confirm that #7355 fixes this issue (or rather, the second part of this issue).

@albertlast
Copy link
Collaborator

Why not #6271 ?

@Sesquipedalian
Copy link
Member

Why not #6271 ?

As @sbulen mentioned in the comments on that PR:

Note that IMAGETYPE_WEBP is only defined in php 7.1+.

We support PHP 7.0, so not an option yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants