php - Converting RAW to JPEG (attempting to use) ImageMagick -


i not care if solution converts raw jpegs uses imagemagick or not, appeared doucmented, started there.

i have had success converting jpeg different sized jpeg, have been unable convert raw jpeg. after looking @ convert raw photos jpeg in linux/php, tried code:

try {     $im = new imagick($inputurl);     $im->setimageformat("jpg");     $im->writeimage($outputurl);     $im->clear();     $im->destroy(); } catch (exception $e) {     echo $e; } 

and received error:

exception 'imagickexception' message 'unable open image `/tmp/magick-xxaana6q.ppm': no such file or directory @ blob.c/openblob/2480' in /upstream/public_html/core/functions.php:116 stack trace: #0 /upstream/public_html/core/functions.php(116): imagick->__construct('/upstream/p...') #1 /upstream/public_html/core/functions.php(129): resizeimage('/upstream/p...', '/upstream/p...', array) #2 {main} 

i tried:

exec("/usr/bin/convert -define jpeg:size=1280x720 {$inputurl} {$outputurl}"); 

based on same post near bottom, not producing file.

then tried raw jpeg conversion, haven't had luck code either. modified convert pdf jpeg php , imagemagick no avail (edit: got similar error 1 above):

try {     $im = new imagick();     $im->setresolution(300,300);     $im->readimage($inputurl);      $im->setimageformat("jpg");     $im->writeimage($outputurl);     $im->clear();     $im->destroy(); } catch (exception $e) {     echo $e; } 

for kicks, these variations i've tried:

//echo "/usr/bin/convert {$inputurl} -resize {$dimensions[0]}x{$dimensions[1]} {$outputurl}"; #phpinfo(); #exec("/usr/bin/convert {$inputurl} -resize {$dimensions[0]}x{$dimensions[1]} {$outputurl}"); #exec("/usr/bin/convert {$inputurl} -define {$dimensions[0]}x{$dimensions[1]} {$outputurl}"); #exec("/usr/bin/convert -resize {$dimensions[0]}x{$dimensions[1]} rgb:{$inputurl} {$outputurl}"); #exec("/usr/bin/convert -define jpeg:size=1280x720 {$inputurl} {$outputurl}"); 

(potentially) pertinent details:

  • i using webhostinghub host /usr/bin/convert equivalent convert.
  • (edit) using sony camera, such of raw files contain .arw extension


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -