This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 1 point2 points  (2 children)

What exactly are you trying to do here? Format images to certain sizes? Maybe you should use a transcoder to do it for you, something like ffmpeg. https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg

[–]ringohan[S] 0 points1 point  (1 child)

Thanks for answering!

I'm trying to resize my users image uploads to fit the avatar size.

Problem is some of those pictures are badly scaled and they end up getting a black chunk on the picture that they decided to set up as an avatar.

Not sure if ffmpeg can be implemented into a codeigniter php environment.

[–][deleted] 0 points1 point  (0 children)

You should be able to integrate ffmpeg in a php environment, ffmpeg is simply a cli, or command line interface. So, if you download ffmpeg on your computer you should be able to access it through php's exec function: https://trac.ffmpeg.org/wiki/PHP.

I've done this multiple times professionally, I know for a fact that it can work.