Module eimp

Copyright © (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------

Authors: Evgeny Khramtsov (ekhramtsov@process-one.net).

Data Types

convert_opt()

convert_opt() = {scale, {width(), height()}}

error_reason()

error_reason() = unsupported_format | timeout | disconnected | encode_failure | decode_failure | transform_failure | too_many_requests | image_too_big

height()

height() = non_neg_integer()

img_type()

img_type() = png | jpeg | webp | gif

info()

info() = [{type, img_type()} | {width, non_neg_integer()} | {height, non_neg_integer()}]

limit_opt()

limit_opt() = {limit_by, term()} | {rate_limit, pos_integer()}

width()

width() = non_neg_integer()

Function Index

convert/2
convert/3
format_error/1
get_type/1
identify/1
identify/2
is_gd_compiled/0
is_gd_compiled/0
is_supported/1
start/0
stop/0
supported_formats/0

Function Details

convert/2

convert(Data::binary(), To::img_type()) -> {ok, binary()} | {error, error_reason()}

convert/3

convert(Data::binary(), To::img_type(), Opts::[convert_opt() | limit_opt()]) -> {ok, binary()} | {error, error_reason()}

format_error/1

format_error(X1::error_reason()) -> binary()

get_type/1

get_type(X1::binary()) -> img_type() | unknown

identify/1

identify(Data::binary()) -> {ok, info()} | {error, error_reason()}

identify/2

identify(Data::binary(), Opts::[limit_opt()]) -> {ok, info()} | {error, error_reason()}

is_gd_compiled/0

is_gd_compiled() -> any()

is_gd_compiled/0

is_gd_compiled() -> any()

is_supported/1

is_supported(X1::img_type()) -> boolean()

start/0

start() -> any()

stop/0

stop() -> any()

supported_formats/0

supported_formats() -> [img_type()]


Generated by EDoc