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

Support for pdf, tif, jp2, webp #501

Open
asajedi opened this issue Jun 21, 2016 · 6 comments
Open

Support for pdf, tif, jp2, webp #501

asajedi opened this issue Jun 21, 2016 · 6 comments
Labels

Comments

@asajedi
Copy link

asajedi commented Jun 21, 2016

Hi,
is it possible to add support for the following formats:

  • pdf
  • tif
  • jp2
  • webp

in
lib/Imagine/Imagick/Image.php

private function getMimeType($format)
{
    static $mimeTypes = array(
        'jpeg' => 'image/jpeg',
        'jpg'  => 'image/jpeg',
        'gif'  => 'image/gif',
        'png'  => 'image/png',
        'wbmp' => 'image/vnd.wap.wbmp',
        'xbm'  => 'image/xbm',
    );

    if (!isset($mimeTypes[$format])) {
        throw new RuntimeException(sprintf('Unsupported format given. Only %s are supported, %s given', implode(", ", array_keys($mimeTypes)), $format));
    }

    return $mimeTypes[$format];
}
@alexwilson
Copy link
Contributor

Might be worth adding this into #504 ?

@burzum burzum added the feature label Feb 5, 2017
@theDyingMountain
Copy link

The Imagine Classes still dont't support webp. E.g. imagecreatefromstring is called, which doesn't support webp see https://github.com/avalanche123/Imagine/blob/develop/src/Gd/Imagine.php#L91

@lashus
Copy link
Contributor

lashus commented May 9, 2019

I'm surprised that for 3 years this hasn't been resolved yet :) I've created PR for this - @avalanche123 could you please take a look? It's not a BC.

@mlocati
Copy link
Collaborator

mlocati commented May 9, 2019

I'm surprised that for 3 years this hasn't been resolved yet :)

Maybe you are the first one that needs it and is willing to implement it 😉

@lashus
Copy link
Contributor

lashus commented May 10, 2019

Maybe you are the first one that needs it and is willing to implement it

Don't take me wrong - I wasn't trying to be negative :) Just an observation and clearly the webp format is not as popular as google thinks ^^

@jdaury
Copy link

jdaury commented Sep 12, 2019

Hi all, are there any plans to support .tif file also?

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

No branches or pull requests

7 participants