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 7931711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:48:12+00:00 2026-06-03T20:48:12+00:00

I recently started using imagemagick with php and I’m relatively new with both of

  • 0

I recently started using imagemagick with php and
I’m relatively new with both of these, IM and PHP.
So, I’m here to ask for some help/suggestion(s).

First

If lets say a user uploads a gif or a png image on
my site and I want it converted to jpg, is there any
command like for example.$image->convert($file,'.jpg)
or the convert command is accesible only thru exec() ?
like for example exec(convert picture.png to picture.jpg)

Second

What if for again, the user uploads gif/png on the site
and I resize the image to a specified width/height and
write the image, with the writeImage function of IM like this:
$image->writeImage(basename.$ext) where $ext = jpg.
Will this work properly,is this a good practice? I assume this will
only rename it but still, I don’t see a problem in this… o.O

Oh sorry one more question, I’m not very familiar with exec,
is it better using imagemagick using exec(), does it improve
speed, load etc?

  • 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-03T20:48:14+00:00Added an answer on June 3, 2026 at 8:48 pm

    I can’t answer your questions directly but thought I point you to a few resources:

    Regarding which is better, exec or the PHP extension, I asked this same question a few months ago:

    Should I use a PHP extension for ImageMagick or just use PHP's Exec() function to run the terminal commands?

    For all Image Magick PHP functions you should look up the official guide:

    http://www.php.net/manual/en/book.imagick.php

    I switched from Image Magick to Graphics Magick as I heard it has better performance. It is a fork of Image Magick with an emphasis on performance. Large sites like Flickr and Etsy use it:

    http://www.graphicsmagick.org/

    This guide got me started:

    http://devzone.zend.com/1559/manipulating-images-with-php-and-graphicsmagick/

    And they have their own manual on php.net:

    http://php.net/manual/en/book.gmagick.php (most of the commands are identical to Image Magick’s)

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

Sidebar

Related Questions

I recently started using Eclipse for PHP Development. Please suggest me some HTML WYSIWYG
I recently started using Riak with PHP. How exactly do I store JSON data?!
I've just recently started using VS2008 for a new tools project, and have been
I recently started using a new server for a client and am having problems
I am good in web development but recently started using PHP and developed few
I recently started using scons to build several small cross-platform projects. One of these
I recently started using Git as my version control system for some Cocoa projects
I recently started using Git when creating a new project - until then I
I recently started using lcov to visualize my code coverage. It's a great tool.
Ive recently started using CodeIgniter as I was searching for a very lightweight framework

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.