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

Frames property not working #266

Open
2 tasks
iamtompickering opened this issue Jun 13, 2024 · 1 comment
Open
2 tasks

Frames property not working #266

iamtompickering opened this issue Jun 13, 2024 · 1 comment

Comments

@iamtompickering
Copy link

iamtompickering commented Jun 13, 2024

I'm submitting a...

  • [ x] bug report
  • feature request
  • general question

Steps to reproduce

  1. Include frames in transform options

Description

I'm trying to use the frames property to convert a gif to an image using the first frame only. The code I have is

{% set transformedImage = craft.imagerx.transformImage(image, { frames: 0, width: 1000 }) %}

Seems to be identical to what you have in your docs, but it just doesn't work for me. Instead, the image is still generated as a gif. I've also tried to add 'format: 'jpg'' as a property, but then it just stacks all of the frames on top of each other in a jpg transform.

Any idea why this wouldn't be working for me?!

Additional info

  • Imager version & edition: 4.4.0
  • Craft version: 4.10.0
  • PHP version: 8.0
  • Image driver & version: GD 8.0.30
@aelvan
Copy link
Contributor

aelvan commented Jun 16, 2024

Hi,

I've testet this now, and it works as expected for me.

When you write ...the image is still generated as a gif, that in itself is not an error, if the input format is gif and you don't specify otherwise, the output format will be gif. But, to be clear, what you mean is that the generated transform is an animated gif?

And this ...but then it just stacks all of the frames on top of each other in a jpg transform. seems very odd indeed! 😅 No idea how something like that might happen in Imager.

Any chance you can share the gif you're seeing this behaviour with?

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

No branches or pull requests

2 participants