Closed Kitsune2222 closed 1 year ago
Have a look into issue #702. There is example code there.
It turns out that I did everything right, I made a mistake in the decoder of several images and it displayed the first one. Thank you.
P.s. another question Code:
int width = 1050;
int height = 1500;
err = heif_image_create(width, height, heif_colorspace_RGB, heif_chroma_interleaved_RGBA, &img);
err = heif_image_add_plane(img, heif_channel_interleaved, width, height, 32);
int stride;
uint8 *enc_image = heif_image_get_plane(img, heif_channel_interleaved, &stride);
but stride is 4208, (1050*4=4200) it's 8 bytes more than it should be, is this normal? Final image resolution is correct 1050x1500.
@Kitsune2222 it is a padding, all is fine
Thanks for the quick response
Have a look into issue #702. There is example code there.
Sorry for typing into a closed thread. I am a basic Linux user and couldn´t figure out what I exactly have to do, when I want to convert multiple jpg files in a folder into Avif. helf-enc is not able to work with * .
That's just basic shellcode:
for input in *; do
heif-enc [args] "$input"
done
You can put it all on one line, between semicolons, if you want a one-liner:
for input in *; do heif-enc [args] "$input"; done
Actually the question is in the title, I did not find instructions, but the possibility is stated.