Questions tagged [imagick]

1

votes
3

answer
1.5k

Views

What is the difference between Imagemagick and Imagick?

What is the difference between Imagemagick and Imagick ? How do I configure Imagick to work with IIS and php 5.4.14?
punith
0

votes
0

answer
9

Views

PHP ImageMagick: how to antialias a line

I am having problems with line having jagged edges (see white line): If I reduce stroke (from 10 to 4), then it's OK, but the line is not visible enough (I need thicker line): I've set $canvas->setStrokeAntialias(true); but it doesn't help. If I increase the image resolution, then I need to make big...
Primož Kralj
1

votes
0

answer
93

Views

Imagick / ImagickDraw setFont and setFontFamily timing out

I have a PHP script that uses Imagick/ImageMagick to dynamically build images as required using data from a database. This has been working fine for the last few years but I restarted (after installing some OSX updates) the hardware that the site is running on earlier and all of a sudden it now won'...
Ian
1

votes
2

answer
323

Views

replace multiple Colors with transparent in an image

i have a rain radar image here with big grey and white parts as backgroound. i need to remove the background ( grey / white ) and make in transparent. but it does not work. i already tried // replace white $rgb = imagecolorexact($im, 255, 255, 255); imagecolortransparent($im, $rgb); // replace grey...
seking
1

votes
1

answer
267

Views

Imagick fails resizing GIF images when file size is larger than 2mb

I'm using Imagick PHP extension for resizing GIF images to several sizes. When I trying with a GIF image of 3mb size, it doesn't get resized. But for images less than 1mb, they are getting resized successfully. If anyone else has faced this problem, please advise! Here my code if ($extension === 'g...
1

votes
1

answer
391

Views

ImageMagick creates huge temporary files

I'm using imagick for GIF file uploads with resizing. Im used to upload filesizes ranges from 5mb -15mb Due to huge tempory files my site gets crashed and also images are not getting converted correctly. How can I fix this? $imagick = new Imagick($_FILES['file']['tmp_name']); foreach ($imageFolders...
1

votes
0

answer
37

Views

Imagick doesn't resize vector GIFs correctly PHP

I'm using imagick for image uploads and resizing. when I try to resize GIF image with vector graphics it won't resize as original. but normal animated giphys are woring. please advice https://giphy.com/explore/vector-design these giphs are not resizing with correct animation. below is my code. $ima...
1

votes
0

answer
31

Views

php Imagick - why does it save in that folder?

I am using Imagick for the first time and discovered ununderstandable behaviour; consider a code: public function cropImage() { $dir = '/'; $image = new Imagick ( $this->file['tmp_name'] ); $w = $image->getImageWidth(); $h = $image->getImageHeight(); $image -> cropImage( $w, $h, 0, 0 ); $image -> wr...
Kalreg
1

votes
0

answer
23

Views

Resized frames from source gif add to new gif in Imagick PHP

I try to crop and then resized frames in gif to small resulotion - 160x160 and 200x200. But not all frame was cropped. Here's my code: $dstImage->setImageFormat('gif'); $srcImage = $srcImage->coalesceImages(); $dstImage = $dstImage->coalesceImages(); while ($srcImage->hasNextImage()) { $srcImage->cr...
1

votes
0

answer
114

Views

ImageMagick create circle count on top of image

Hey all I have the following Magick.net code: List lFiles = new List(); bool isBlankImage = false; lFiles.Add(@'C:\Users\David\Pictures\1.jpg'); lFiles.Add(@'C:\Users\David\Pictures\blank.png'); lFiles.Add(@'C:\Users\David\Pictures\blank.png'); lFiles.Add(@'C:\Users\David\Pictures\blank.png'); lFile...
StealthRT
1

votes
1

answer
39

Views

I can't draw a square when converting a CMYK image to PDF

I can draw a square when I convert an RGB colour image to pdf, but It does not work when I do it with a CMYK image. Below is my code: $folderName = 'storage\new.pdf'); $safeArea = new \ImagickDraw(); $safeArea->setStrokeWidth(2); if ($metaData['colourMode'] == 'CMYK') { $colorSpace = \imagick::COLOR...
Marco
1

votes
1

answer
69

Views

PHP in Apache and CLI using same php.ini file but in Apache ImageMagick has no supported formats

What would cause this discrepancy in the supported formats? php -ini on the command line: imagick imagick module => enabled imagick module version => 3.4.3 imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator Imagick compiled with ImageMagick version => ImageMagick 6.7.7-10 20...
Fo.
1

votes
0

answer
31

Views

Print coloured emojis using imagick in php

I want to print the captions imported from facebook/instagram in an image and save it. I want to do this using imagick library with php as I am creating the base image using imagick. The normal text prints properly but the emojis that are imported do not get printed as coloured emoji's. Can anyone s...
user774294
1

votes
0

answer
168

Views

Can't use custom fonts to PHP Imagick with Pango / another solution for arabic ligatures

We have an Image processing microservice that created rich images with text on top of it and we are in the process of adding arabic locale to our website While translating some of the content to Arabic our translator told us that the text in generated images not rendering correctly in arabic - they...
sUP
1

votes
0

answer
1.7k

Views

PHP Imagick not working with php 7.2.6

I have recently loaded php 7.2.6 on my windows server and I have installed the php Imagick extension. The extension is installed properly and it shows up in the phpinfo, but when I run the application, it keeps throwing me the following error: PHP Fatal error: Uncaught Error: Call to undefined func...
Sheikh Saadi
1

votes
0

answer
80

Views

Equalizing image in Codeigniter php using Imagick

I was trying to equalize image in Codeigniter PHP using Imagick, but the code is not working neither it is giving any error. Anyone guide me how to make this equalize work? I have edited the code, kindly help how to remove error? Controller Code: public function equalize_image(){ public...
mareena
1

votes
0

answer
1.3k

Views

PHP Imagick - Install module using composer

I'm Trying to automate the instalation of module php [Imagick]. I was able to install by command line, and the expected result was success full. The Question is: is possible to put in php composer or another automation tool? that fit in linux/windows/Mac. Note: It's no imagick wrapper for php! It's...
sealabr
1

votes
1

answer
107

Views

PHP imagick or any other tool, how to detect if there is visible transparency on gifs files

I am working on a service that can do conversions from gif to mp4 files (with ffmpeg). My problem is some of the gifs have visible transparent areas which end up as white color when I convert them to mp4 video. To avoid that problem I am trying detect if a gif has visible transparent areas so I will...
knpercinel
1

votes
1

answer
31

Views

File won't save with Imagick

I have not changed anything on my website, but recently when users use the form for uploading an image, the file won't save with Imagick. There is no error. Here is a snippet: $file = $_FILES['foto']['tmp_name']; $im = new Imagick($file); $im->setImageBackgroundColor(new ImagickPixel('white')); $im-...
Marianne
1

votes
1

answer
273

Views

pecl can't find imagick package

I am attempting to install imagick on my mac. I have searched and read a lot...including this excellent write up. However, I am running into an issue with the final step and that is the actual install of the imagick package via pecl. I am receiving this error: No releases available for package 'pecl...
MichaelB
1

votes
1

answer
109

Views

Custom Thumbnails in Wordpress using Imagick

I want to upload an image to Wordpress and create a really custom additional thumbnail for it using imagick. I have the code for imagick - that works. But I have no idea, how I should implement it in the wordpress upload. Can you help me with this? Is there maybe a better way to do this than to hoo...
Bernhard
1

votes
1

answer
62

Views

Imagick convert svg to png with google fonts

Wel i came to a problem when using imagick i'm missing fonts which where used in svg. Searched internet but couldn't find the answer that can be used. svg contains something like this: @import url('https://fonts.googleapis.com/css?family=Faustina'); @import url('https://fonts.googleapis.com/css?fam...
Naberd Zendi
0

votes
0

answer
4

Views

How to fix “photos can not be regenerated” bug in Piwigo?

This question also posted on GitHub at https://github.com/Piwigo/Piwigo/issues/1003. Getting error # photos can not be regenerated in Batch -> Generate Multiple Batch Size Images. Image sizes not being generated on upload. Piwigo appears to be looking in the wrong directory for uploaded image files....
J Vines
1

votes
0

answer
25

Views

Partial image download using cURL. How to detect?

We use PHP-cURL to download images from the web for one of our apps and sometimes the image downloads partially due to a timeout. Here is what a partially downloaded image looks like I am wondering if there is any way to detect this using PHP? We don't see any errors as far as cURL is concerned. Any...
hvs
1

votes
0

answer
24

Views

Liip bundle rotate Image only on iOS

I'm currently working on a website where we could upload live photos with smartphones. I'm blocked with an issue and I can't figured out how to resolve it. I try to take a photo and upload it in application. On Android the photo is displayed with the correct way (portrait or landscape photos). On i...
Alexis
1

votes
0

answer
22

Views

How to set transparent background of linked SVGs when convertig SVG to PNG using imageick

I have SVG with embedded SVGs (image). When I convert it to a PNG everything looks fine so far but the background of the SVGs stays white instead of transparent. Original SVG as shown in Firefox PNG Output of Imageick My Code $im = new \Imagick(); $im->setBackgroundColor(new \ImagickPixel('transpare...
Christian
1

votes
2

answer
1.7k

Views

How do I remove EXIF tags while preserving the ICC color profile?

I am programmatically generating several sizes of thumbnails for images. I need to preserve the color space of an image while removing all (other) EXIF information. I am using imagick on PHP 5.3, but information on how to do this with any imagemagick API would be helpful. I'm trying to prune the fil...
Kyle Wiens
1

votes
2

answer
3.9k

Views

output a PDF file using imagic and PHP

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->rea...
Riyas
1

votes
1

answer
675

Views

PHP Imagick: copy a specific color from an image to a new image

I have an image and I want to copy/extract a specific color (i.e., #00ffff) from the image, ideally specifying a fuzz factor, to a new image. I know about transparentPaintImage(), but it's unavailable in my environment (Ubuntu 10.04). Any other ideas? Thanks.
scotts
1

votes
1

answer
1.1k

Views

IMagick function to cut an image into roughly equally-sized tiles

I'm trying to use the IMagick PHP wrapper to assist in chopping a specified image into a set of tiles (the number of which is variable). In the ImageMagick documentation there is reference to the -crop operator accepting an optional flag of @ that will instruct it to cut an image into 'roughly equal...
Jon
1

votes
1

answer
2.2k

Views

replace solid color in transparent PNG with imagick or GD

I just have a transparent PNG with star graphic in a solid color, let's say #FF0000; What can I do to replace or convert to any hex color my user chooses? I looked on PHP but after trying lot's of code, nothing seems to work? (for almost all of the imagick functions on PHP.net I get a warning, 'This...
FFish
1

votes
1

answer
1.3k

Views

PHP Imagick PDF to JPEG Problem

I am having this error that comes up when I try to convert certain pdfs into JPEgs The error message is: [28-Mar-2011 13:24:02] PHP Fatal error: Uncaught exception ' Stack trace: #0 /home/bobdole/public_html/viewfile.php(41): Imagick->__con #1 {main} thrown in /home/bobdole/public_html/viewfile.php...
Devin Dixon
1

votes
2

answer
794

Views

Image Magick, installed, loaded, error opening files php

Using php 5.3 on windows 2008 in IIS 7. I've installed NTS image magick and add php_imagick.dll to the php extensions directory and included it in php.ini . Restarted the machine and imagick shows up in phpinfo. On this page I can run example #4 without problem. As soon as I attempt to load a file...
joeyadms
1

votes
3

answer
1.1k

Views

imagick overlaying text on pdf letter

I have pdf designed letter. Now using php I would like to fetch the address and put it on pdf letter and generate another pdf file with that address dynamically. How can I do this.
Developer
1

votes
2

answer
1.1k

Views

No formats supported in PHP/ImageMagik/imagick

I've installed pecl-imagick from FreeBSD ports and it can't do a thing with images. phpinfo() reports this: ImageMagick number of supported formats: 0 ImageMagick supported formats: no value But ImageMagick installed correctly and show all it's stuff: $ convert -list configure ... DELEGATES...
wiz
1

votes
3

answer
379

Views

Memory leakage in php unrelated to GC?

I have a php script which takes an image, processes it and then writes the new image to file. I'm using imagick/imagemagick with php 5.3.8 with fastcgi. After reading around I thought maybe the garbage collecting function might help but it hasn't stopped php's memory usage in TOP from growing to tri...
incognito2
1

votes
1

answer
793

Views

Image filesize after resizing with Imagick and Gmagick

While resizing an image, I have noticed that Imagick and Gmagick produce images with different filesize on HDD with the same options: $image = new Imagick('c.jpg'); $image->thumbnailImage(260,195); $image->writeImage('c_imagick.jpg'); outputs an Image with 88kb $image = new Gmagick('c.jpg'); $image...
RussianRoot
1

votes
3

answer
415

Views

polyline auto-closes - how to draw an open polyline?

I'm in need of drawing continuous lines in PHP. GD apparently can't do it, but imagick has a polyline function. Now my test code: $image = new Imagick(); $image->newImage(100, 100, new ImagickPixel('white')); $draw = new ImagickDraw(); $draw->setStrokeWidth(3); $line = array( array('x'=>10, 'y'=>10)...
Tom
1

votes
1

answer
1.5k

Views

php imagick setCompressionQuality and compositeImage

I have experienced a problem obtaining the effect of compression during joining two images together - an image and background. Gennerally the idea is to make an final image while first, main image doesn't lose its quality but the background does (in effect is compressed). Does anyone know how to do...
pawella
1

votes
3

answer
2.5k

Views

PHP use of IMAGEMAGICK or imagick or magicwand

I use Imagemagick (www.imagemagick.org) Since i am on hostgator i also have imagick and magickwand installed. I can do simple manipulation with imagick and magickwand but if i want to reproduce the advanced tutorials at imagemagick.org i fail. Goal: make this working http://www.imagemagick.org/Usag...
Email

View additional questions