imagick

ImageMagick creating thumbnail

梦想的初衷 提交于 2019-12-25 07:48:42
问题 here is code which creats animated text using imagemagick.. $label=$_POST["label"]; $cmd = " -background transparent -font $font -pointsize $size label:$label -stroke black -strokewidth 2 ". " \( -clone 0 -tile \"" . $image . "[0]\" -stroke black -strokewidth 2 -gravity center -annotate +0+0 $label \) ". the above code wokrs fine when i enter "1234" in label field ... but it doe not when i type"12 34" it displays only "12" it is not taking "space" in between charcter ...something needs to be

imagick converting pdf to jpg throws an error

痴心易碎 提交于 2019-12-25 06:23:59
问题 for ($i = 0; $i < $int; $i++) { $im = new imagick(); // $im->readimage($soubory."[".$i."]"); $im->setResolution(300, 300); $im->readImage($soubory . "[" . $i . "]"); $im->resampleImage(150, 150, imagick::FILTER_UNDEFINED, 1); $im->resizeImage(512, 700, Imagick::FILTER_LANCZOS, 0); $im->setImageFormat('jpeg'); $im->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH); $im->setImageFormat('jpg'); $i = sprintf("%03s", $i); $im->writeImage('../pdf/publisher/' . $select . '/x-' . $i . '.jpg'); $im-

Divide photo to X and Y pieces

巧了我就是萌 提交于 2019-12-25 05:08:46
问题 I have a 96x96 image and i need to divide it in 36 pieces of 16x16 and i have a script given below works fine on my localhost but not working on my webhost. function makeTiles($name, $imageFileName, $crop_width, $crop_height) { $dir = "/pic"; $slicesDir = "/pic/16X16"; // might be good to check if $slicesDir exists etc if not create it. $ImgExt = split(".",$imageFileName); $inputFile = $dir . $imageFileName; $img = new Imagick($inputFile); $imgHeight = $img->getImageHeight(); $imgWidth = $img

Resize-reduce/thumbnail Images during uploading with ImageMagick

岁酱吖の 提交于 2019-12-25 04:46:06
问题 i have html form to upload images , I want to Resize-reduce/thumbnail during the uploading process. $uploadDir= "/uploads"; $imageName= $_FILES['image']['name']; $tempPath = $_FILES['image']['tmp_name']; move_uploaded_file ($tempPath,$uploadDir); resize-reduce: convert $imageName -resize 800x600 -strip -quality 50 -interlace line output.jpg thumbnail: convert $imageName -resize x120 -gravity center -crop 120x120+0+0 +repage thumb_output.jpg this is the first time using Imagick ! thank you 回答1

Weird results using PHP-Imagick getImageSignature method

[亡魂溺海] 提交于 2019-12-25 03:47:05
问题 I´m trying to use PHP Imagick´s getImageSignature method to compare different images and see if they are equal, but I´m getting different signature even with same image file when the method is called from different computers with different versions of ImageMagick and OS. Should I always get the same signature in these conditions? Thanks a lot. 回答1: Should I always get the same signature in these conditions? Short answer is no. The Imagick::getImageSignature wraps MagickGetImageSignature which

Imagick Error convert tiff to pdf

家住魔仙堡 提交于 2019-12-25 02:29:30
问题 When I tried converting a picture via : convert image.tiff image.pdf It thorws the error: convert: no images defined `mosaic.jpeg' @ error/convert.c/ConvertImageCommand/3187. I tried installing and reinstalling imagick , libtiff and jpeg. But it didn't help. It used to work on the same machine (Mac Mavericks) but I had to reboot my machine and reinstall everything, and now it doesn't work. Thank you. **(UPDATE) Issue Resolved: ** Installed GraphicMagick instead and worked! 回答1: Are you using

PHP SVG read on OSX Mavericks (MAMP 3) using Imagick

。_饼干妹妹 提交于 2019-12-25 02:25:26
问题 I have nearly the same problem like here: ImagickException with message Postscript delegate failed on MAMP 3.0.5 I would like to read an SVG file (5 set Venn Diagram), which I created with php and I would like to write it out to a png/jpeg or whatever file... nothing work. It breaks on the 3rd line: $im = new Imagick(); $svg = $venn_diagram; $im->readImageBlob($svg); $im->setImageFormat("jpeg"); $im->adaptiveResizeImage(720, 445); $im->writeImage($folder . 'output_venn_diagram.png'); $im-

Calling PHP unlink() after move_uploaded_file() on moved file fails

跟風遠走 提交于 2019-12-24 18:48:36
问题 I am sending files uploaded to my server to Amazon S3 . To do this, I: Use move_uploaded_file() to send file to a temp-uploads folder. I use the S3 SDK to upload the file as an object to S3. I use unlink() to delete the file. unlink() fails with Resource temporarily unavailable Windows Server running PHP/Apache. I can unlink later after the script is done running. Calling the unlink() command outside of the script deletes the file from the server immediately. I was trying to figure out how to

Image gets darker in imagick

≯℡__Kan透↙ 提交于 2019-12-24 17:00:22
问题 I need help (My english is not good, please try to understand what i'm trying to find). Currently i'm working in a project based on image transformation, where i'm using imagick to transform image. I'm successfully transformed my image. What i am doing in my project is taking a photo(photo1), placing it to another photo (photo2 {the grey are is transparent}) which create the following effect photo3. Then replaceing it again with photo2 (to create the mask effect which showing the hand), and

output a PDF file using imagic and PHP

孤街醉人 提交于 2019-12-24 15:03:04
问题 I have some PDF's that are stored in a SQL server with data type Image. Now I want to merge them into a single document with Imagic from a PHP page. Here is the code: $combined = new Imagick(); while( $document = mssql_fetch_assoc( $mssqlResult ){ $image = new Imagick(); $image->readImageBlob( $document['Contents'] ) ; $combined->addImage( $image ); $image->clear(); $image->destroy(); } $combined->setImageFormat("pdf"); $combined->writeImages( 'test.pdf', true ); This works, and the test.pdf