ImageMagick

How to install ImageMagick to use with PHP on Windows 7 (3)

青春壹個敷衍的年華 提交于 2019-12-17 10:29:33
问题 There are other threads about how to install Imagick on Windows 7 but no help for me so far. :( (Maybe problems have came up with more recent versions) I have followed these steps to install: Download and install ImageMagick http://www.imagemagick.org/download/binaries/ImageMagick-6.8.8-1-Q16-x86-dll.exe Download php_imagick.dll and copy to extension dir (c:\xampp\php\ext) http://www.peewit.fr/imagick/php55/vc11/x86/ts/php_imagick.dll Edit php.ini file and add new extension (c:\xampp\php\php

Python Wand convert PDF to PNG disable transparent (alpha_channel)

那年仲夏 提交于 2019-12-17 08:59:20
问题 I'm trying to convert a PDF to PNG - this all works fine, however, the output image is still transparent even when I believe I have disabled it: with Image(filename='sample.pdf', resolution=300) as img: img.background_color = Color("white") img.alpha_channel = False img.save(filename='image.png') The above produces the images but are transparent, I also tried the below: with Image(filename='sample.pdf', resolution=300, background=Color('white')) as img: img.alpha_channel = False img.save

Detect EXIF Orientation and Rotate Image using ImageMagick

江枫思渺然 提交于 2019-12-17 07:12:55
问题 Canon DSLRs appear to save photos in landscape orientation and uses exif::orientation to do the rotation. Question: How can imagemagick be used to re-save the image into the intended orientation using the exif orientation data such that it no longer requires the exif data to display in the correct orientation? 回答1: Use the auto-orient option of ImageMagick's convert to do this. convert your-image.jpg -auto-orient output.jpg Or use mogrify to do it in place mogrify -auto-orient your-image.jpg

How to install Imagick/imagemagick PHP extension on windows 7

喜夏-厌秋 提交于 2019-12-17 04:21:11
问题 How to install image magic in Windows 7. I followed these instruction To install IMagick on Windows XP (php 5.2.x) download and install ImageMagick-6.5.8-7 Q16-windows-dll.exe http://www.imagemagick.org/download/binaries/ ImageMagick-6.5.8-7-Q16-windows-dll.exe download php_imagick_dyn-Q16.dll from: http://valokuva.org/outside-blog-content/ imagick-windows-builds/080709/ copy dll to [PHP]/extension dir and rename it to php_imagick.dll You have to edit your php.ini file and add new extension

Rails - WIndows 7 carrierwave, minimagick resize not working

回眸只為那壹抹淺笑 提交于 2019-12-14 04:12:34
问题 I tried to set up for uploading photos with my rails app. However, the carrierwave uploader does not resize the photos being uploaded. When I do not call the resize_to_fill function, the photos are uploaded perfectly. Any advice? When a photo is submitted with resize_to_fill, the error 'failed to be processed' is returned. How can i fix it? I guess I need to 'require' 'carrierwave/processing/mini_magick' for calling resize_to_fill, but i don't know where to put this file. gemfile "carrierwave

php imagemagick create a Tiled Pyramid TIFF

怎甘沉沦 提交于 2019-12-14 03:57:27
问题 well, i have a problem as the title says. My test function is like this: $imagePath="/tmp/511a3874a0da1"; $pngName=$imagePath.".png"; $tifName=$imagePath.".tif"; $tempImg = new Imagick(); $tempImg->readImage($pngName); //$tempImg->roundCorners(150,150); //$image->transformImage("100x100", "100x100"); $tempImg->setFormat('ptif'); $tempImg->setImageColorSpace(5); $tempImg->writeImage($tifName); well, it generate a tif file, as the manual says, ptif is the format of 'tiled pyramid tiff'. I check

Magick Image creating shadow behind the image

倖福魔咒の 提交于 2019-12-14 03:56:45
问题 Been trying for awhile now trying to get a shadow using the following code: using (MagickImage image = new MagickImage(@"C:\Users\David\Pictures\YnTf9.png")) { MagickImage _shadow = new MagickImage(bitmap); using (IMagickImage backgroundImg = image.Clone()) { backgroundImg.Blur(0, 5); backgroundImg.Crop(400, 300, Gravity.Center); backgroundImg.RePage(); image.Resize(0, 300); _shadow.Resize(0, 300); _shadow.Shadow(10, 10, 0.8, (Percentage)80, MagickColor.FromRgb(0, 0, 0)); backgroundImg

PDF to JPG Imagic page selection

岁酱吖の 提交于 2019-12-14 03:56:39
问题 Loads of answers on how to do it for a command line convert /path/to/file/file.pdf[3] output.jpg great... but what if I am using in memory processing, I am generating PDF with PDFlib and then output its buffer to a function that I want to generate jpg preview of selected page. How? My code : [...] $buf = $pdf->get_buffer(); //$buff is just a PDF stored in a string now. $im = new Imagick(); $im->readimageblob($buf); $im->setImageFormat("jpg"); $im->setimagecompressionquality(60); $len = strlen

What's the best way to greyscale in python/django?

三世轮回 提交于 2019-12-14 03:28:12
问题 I want to greyscale my images that will be uploaded into django. So I found two ways, either opencv or imagemagick. And within imagemagick, imagemagickWand might be better because it's reduced. From the tutorials I think openCV is easier to implement. Any ideas? 回答1: What's the best way to greyscale in python/django? Take your pick. ImageMagick's wand library from wand.image import Image with Image(filename='logo:') as img: img.colorspace = 'gray' img.save(filename='logo_gray.jpg') Or CV2

Does the ImageMagick for iOS support converting jpeg images to GIF ?

落爺英雄遲暮 提交于 2019-12-14 03:19:22
问题 Does the ImageMagick for iOS support converting jpeg images to GIF? How to do that? 回答1: Apparently, ImageMagick does support GIF creation on iOS, even though their website clearly states it only supports png, jpeg and tiff on iOS. I haven't found any source of this worth linking and the other link mentioned below is no longer existing, so good luck with that. 回答2: GIFS are " inherently supported in ImageMagick ", according to comments here. This article describes how to export an animated