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

Reimplement BMP #9

Open
jenstornell opened this issue May 6, 2019 · 4 comments
Open

Reimplement BMP #9

jenstornell opened this issue May 6, 2019 · 4 comments
Assignees

Comments

@jenstornell
Copy link
Collaborator

No description provided.

@peter279k peter279k self-assigned this May 8, 2019
@peter279k
Copy link
Member

Just note that this image format requirement should be let this package require php-7.2 version at least.

You can refer the imagebmp function reference.

@peter279k
Copy link
Member

I want to know why the imagebmp function should require php-7.2 version.

And I saw that it should require php-7.1 version.

I just have the test inside a new Docker container and it looks fine when I call imagebmp function from php-7.1 version.

Instruction

Here is the Dockerfile I create to build the php-7.1 container.

# Install required packages

FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y python-software-properties
RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt-get update
RUN apt-get install -y apt-transport-https apt-utils curl php7.1-cli php7.1-mysql php7.1-curl php7.1-gd
RUN apt-get install -y libcurl3-openssl-dev

ENTRYPOINT [ "bash" ]

After building this container successfully, try entering to this container via interactive shell.

And the final result is as follows:

圖片

When I use the php-7.2 version, it looks fine finally.

Here is the Dockerfile for building php-7.2.

Here is the `Dockerfile` I create to build the `php-7.1` container.

```bash
# Install required packages

FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y python-software-properties
RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt-get update
RUN apt-get install -y apt-transport-https apt-utils curl php7.2-cli php7.2-mysql php7.2-curl php7.2-gd
RUN apt-get install -y libcurl3-openssl-dev

ENTRYPOINT [ "bash" ]

圖片

@jenstornell
Copy link
Collaborator Author

Nice research!

Version 7.2.0 was released 30 Nov 2017. I don't have a problem with having 7.2 as requirement, not personally anyway.

I've not tested it, but if the rest of the formats still work without crashing the whole thing below 7.2 we could have a mixed requirement, something like below?

Requirements

  • PHP 7.0 - gif, jpg and png supported
  • PHP 7.1 - webp supported
  • PHP 7.2 - bmp supported

...or add exceptions to throw errors on old versions with unsupported formats.

@peter279k
Copy link
Member

peter279k commented May 8, 2019

@jenstornell, actually, the imagewebp will be supported on php-7.0+ version :).

圖片

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

No branches or pull requests

2 participants