Imager-File-HEIF
view release on metacpan or search on metacpan
int page
C_ARGS: ig, page, max_threads(aTHX)
void
i_readheif_multi(ig)
Imager::IO ig
PREINIT:
i_img **imgs;
int count;
int i;
PPCODE:
imgs = i_readheif_multi(ig, &count, max_threads(aTHX));
if (imgs) {
EXTEND(SP, count);
for (i = 0; i < count; ++i) {
SV *sv = sv_newmortal();
sv_setref_pv(sv, "Imager::ImgRaw", (void *)imgs[i]);
PUSHs(sv);
}
myfree(imgs);
}
RETVAL = count != 0;
OUTPUT: RETVAL
void
i_heif_compression_names(class)
PREINIT:
size_t count;
struct compression_names_t const *names =
i_heif_compression_names(&count);
size_t i;
PPCODE:
EXTEND(SP, count);
/* 0 is "undefined" */
for (i = 1; i < count; ++i)
PUSHs(sv_2mortal(newSVpv(names[i].name, 0)));
const char *
i_heif_libversion(class)
C_ARGS:
const char *
void
i_heif_encoders(class, enum heif_compression_format fmt = heif_compression_undefined)
PREINIT:
const struct heif_encoder_descriptor *descs[MAX_ENCODERS];
int count;
int i;
struct heif_context *ctx = heif_context_alloc();
HV *enc_stash = gv_stashpv("Imager::File::HEIF::Encoder", TRUE);
HV *param_stash = gv_stashpv("Imager::File::HEIF::Encoder::Parameter", TRUE);
PPCODE:
#if LIBHEIF_HAVE_VERSION(1, 15, 0)
count = heif_get_encoder_descriptors(fmt, NULL, descs, MAX_ENCODERS);
#else
count = heif_context_get_encoder_descriptors(ctx, fmt, NULL, descs, MAX_ENCODERS);
#endif
EXTEND(SP, count);
for (i = 0; i < count; ++i) {
struct heif_error err;
struct heif_encoder *enc = NULL;
const struct heif_encoder_descriptor *desc = descs[i];
( run in 1.038 second using v1.01-cache-2.11-cpan-5511b514fd6 )