ImageMagick

Imagemagick: generate raw image data for PDF flate embedding?

谁说我不能喝 提交于 2019-12-19 21:44:28
问题 I'm trying to come up with a command-line, source code example of a PDF ( see also How to generate plain-text source-code PDF examples that work in a document viewer? ), but with embedding an image. This is how far I got - I have a template hello.pdf : %PDF-1.4 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 4 0 obj << /Type /Page /Parent 3 0 R /MediaBox [ 0 0 612 792 ]

Magick++ in VS2010 - unresolved external symbol

南笙酒味 提交于 2019-12-19 19:52:23
问题 I'm trying to use ImageMagick Magick++ for a C++ Project in VS2010. I installed the Library from here: klick Then in my Project, I added c:/program files/ImageMagick-6.6.6-Q16/include to the include folders. Then I tried to use Magick++ with this code: #include <Magick++.h> void main(int argc, char ** argv){ InitializeMagick(*argv); } But this does not work! VS2010 returns the following errors: error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl Magick:

How can I replace the white rectangle within an image using ImageMagick?

老子叫甜甜 提交于 2019-12-19 17:38:38
问题 Overview: The first picture is my original image. Here I want to replace the white rectangle shown with another image. My approach: I have created a mask image using floodfill and it looks as: Problem: Now I would like to get the distance or co-ordinates of the rectangle in the second image so that I can use those co-ordinates to overlay a new image on top of the first (original image) here. I got a little idea to use ImageMagick's chebyshev morphology operator, but don't know how I can do

imagemagick: brackets in file names 'No such file or directory' — Mac OS X

旧街凉风 提交于 2019-12-19 10:20:21
问题 I've upgraded my Homebrew ImageMagick to 6.9.4-7 version (Mac OS 10.11.5), after which it doesn't understand brackets in file names anymore. This command should consider the first frame of a picture: identify -format '%wx%h,1' 'some_pic.jpg[0]' For JPG it is actually just the picture, so the command is equivalent to: identify -format '%wx%h,1' 'some_pic.jpg' The bracket command works fine on my Ubuntu server and worked before on my Mac. But now it fails with identify: unable to open image

Install ImageMagick for paperclip gem in windows

混江龙づ霸主 提交于 2019-12-19 10:11:38
问题 I followed this guide to use paperclip http://railscasts.com/episodes/134-paperclip?language=en&view=asciicast it is all ok but note that to enable resizing you’ll need to have ImageMagick installed on your server. So how should i install ImageMagick ?? i have WINDOWS 8 and on the site http://www.imagemagick.org/ download does not work!!!! 回答1: It certainly works - you need to make sure of 2 things: You install the correct static version for your OS (32-bit vs 64-bit). The 32-bit (x86) will

Graphicsmagick not working in Elastic Beanstalk with nodejs and S3

我们两清 提交于 2019-12-19 09:42:33
问题 I'm using nodejs and graphicsmagick to process images with text, then streaming the final jpg to S3. Using postman, I was able to test this flow on my localhost and everything works fine. However, I'm having issues now that I moved it to Elastic Beanstalk. When I post to the endpoint, it uploads a blank file to S3 and there are no errors logged in EB. I think it has something to do with the software but am a bit stuck. Any advice appreciated! Thanks! Top file is from localhost, bottom file is

Pdf to image using php-imagick api

丶灬走出姿态 提交于 2019-12-19 09:28:26
问题 i want to convert the PDF to image.But when the out put image generate it's get blur from original.Here is code $uploadfile = ".pdf[53]"; $img = new Imagick($uploadfile); $img->setResolution(300,300); $img->resampleImage(150,150,imagick::FILTER_UNDEFINED,1); $img->resizeImage(512,700,Imagick::FILTER_LANCZOS,0); $img->setImageFormat('jpeg'); $img->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH); $img->writeImage ( "p-53.jpeg" ); Can you please help me. Thank you. 回答1: Remove the resample and

Pdf to image using php-imagick api

我们两清 提交于 2019-12-19 09:28:22
问题 i want to convert the PDF to image.But when the out put image generate it's get blur from original.Here is code $uploadfile = ".pdf[53]"; $img = new Imagick($uploadfile); $img->setResolution(300,300); $img->resampleImage(150,150,imagick::FILTER_UNDEFINED,1); $img->resizeImage(512,700,Imagick::FILTER_LANCZOS,0); $img->setImageFormat('jpeg'); $img->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH); $img->writeImage ( "p-53.jpeg" ); Can you please help me. Thank you. 回答1: Remove the resample and

Please explain this color blending mode formula so I can replicate it in PHP/ImageMagick

有些话、适合烂在心里 提交于 2019-12-19 07:09:14
问题 I've been trying to use ImageMagick to replicate Photoshops Colour Blend Mode. I found the following formulas in an online guide but I don't know what they mean. Do I just need to swap certain channels? 回答1: A is the Foreground pixel, B is the Background pixel, C is the new pixel. H is the Hue value for each pixel, S is the Saturation value, L is the Luminance value, and Y is the Brightness value. (Not sure what the difference is between luminance and brightness though. Anyway, in the first

ImageMagick PNG Resize Increases File Size

淺唱寂寞╮ 提交于 2019-12-19 06:15:21
问题 I am resizing images using ImageMagick. If I pass a -resize WxH option it behaves as expected. But if I pass -resize WxH! (to ignore aspect ratio during resize), some images, especially PNGs, are actually increasing in size. A 200k image becomes 450k, a 170k image becomes 360k and so on. Any ideas why this is hapenning and how to fix it? Thanks 回答1: After researching, I upgraded my ImageMagick version from 6.3.7 to 6.5.6, and now it is working great. Resizing images is generating smaller