Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:13:40+00:00 2026-06-03T05:13:40+00:00

I am looking to accomplish this in CodeIgniter specifically. The PHP App I am

  • 0

I am looking to accomplish this in CodeIgniter specifically.

The PHP App I am coding allows a user to upload either a jpg or an animated gif image. On the next step I want to allow the user to use jCrop to crop a few different size thumbnails. This would require me to convert a new copy of the animated gif to a jpg. My code works fine with uploaded jpg images, but creates a broken image for gif files. Is what I am trying to do possible?

My Code:

                // Create image to crop
            $config['image_library'] = 'ImageMagick';
            $config['library_path'] = '/usr/bin';
            $config['source_image'] = $this->config->item('upload_dir_path') . $file_path . 'original.' . $file_ext;
            chmod($config['source_image'], 0777);
            $config['new_image'] = $this->config->item('upload_dir_path') . $file_path . 'crop-me.jpg';
            $this->image_lib->initialize($config); 
            $this->image_lib->resize();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:13:41+00:00Added an answer on June 3, 2026 at 5:13 am

    For those interested in my solution, I simply used the built in GD PHP functions. I have little experience dealing with gif files so I was expecting this to be difficult. The fact of the matter is the CodeIgniter Image_lib and extended library (Which I never got to work properly) is overkill for this.

    Here is what I used:

    $image = imagecreatefromgif($path_to_gif_image);
    imagejpeg($image, $output_path_with_jpg_extension);
    

    Very easy and worked perfectly for what I needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for an expression that allows me to accomplish this: I have an image
I'm preferably looking for a SQL query to accomplish this, but other options might
I am looking for advice on a way to accomplish this. Given the following:
Looking for some advice on how I might accomplish this MySQL task: I want
This question relates to a RoR quiz app. I am looking to display the
I am looking to accomplish the following and am wondering if anyone has a
Here's what I am looking to accomplish, I have a class that has an
Looking around the web, I've seen this simple pattern that implements a (thread-safe) singleton
I tried looking this up in google, but couldnt find any anything... I am
I'm looking for a more efficient way of completing this task. I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.