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

Can't convert PNG to ICO #157

Closed
xavier-GitHub76 opened this issue Sep 28, 2024 · 3 comments · Fixed by #167
Closed

Can't convert PNG to ICO #157

xavier-GitHub76 opened this issue Sep 28, 2024 · 3 comments · Fixed by #167
Labels
bug Something isn't working

Comments

@xavier-GitHub76
Copy link

Hello,

ffmpeg seems to be able to convert an image to ICO format

image

but the click on "Convert" is without effect

image

Regards

@C4illin C4illin added the bug Something isn't working label Sep 29, 2024
@C4illin
Copy link
Owner

C4illin commented Sep 30, 2024

can you convert other images? png to ico works here

@Aymendje
Copy link
Contributor

Aymendje commented Oct 2, 2024

ffmpeg wont convert images bigger than 256x256

[vost#0:0/bmp @ 0x5911946e9c0] Error initializing output stream: 
Conversion failed!

Failed to convert ./data/uploads/141871016628241/44/371766004-81c5a803-2ba4-4a3e-ae30-2a1228948374.bmp from bmp to ico using ffmpeg. error: Error: Command failed: ffmpeg -i "./data/uploads/141871016628241/44/371766004-81c5a803-2ba4-4a3e-ae30-2a1228948374.bmp" "./data/output/141871016628241/44/371766004-81c5a803-2ba4-4a3e-ae30-2a1228948374.ico"
ffmpeg version 6.0.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924
  configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   5.  0.100 /  5.  0.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, bmp_pipe, from './data/uploads/141871016628241/44/371766004-81c5a803-2ba4-4a3e-ae30-2a1228948374.bmp':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: bmp, bgr24, 1767x630, 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> bmp (native))
Press [q] to stop, [?] for help
[ico @ 0x5911ade8540] Unsupported dimensions 1767x630 (dimensions cannot exceed 256x256)
[out#0/ico @ 0x5911a6a1c40] Could not write header (incorrect codec parameters ?): Invalid argument
[vost#0:0/bmp @ 0x5911946e9c0] Error initializing output stream: 
Conversion failed!

Also, the error you are seeing in the console is unrelated

@C4illin ideally we might want some kind of chart / extension for each of the converters to add specific constraints (ie : convert ico cant be bigger than 265x265, or warning when converting gif to png that only the first frame is kept, etc.)
Also maybe adding custom argument (ie : in ffmpeg, you can rescale an image by adding some scale argument)

@C4illin
Copy link
Owner

C4illin commented Oct 2, 2024

I think that in this case it might be easier to just resize the image automatically with ffmpeg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants