ImageMagick

Imagick (Imagemagick) Defect in Debian Sqeeze (6)

我是研究僧i 提交于 2019-12-21 19:39:49
问题 I have huge troubles running my cakephp application now. after upgrading vom lenny to squeeze (even tried a complete reinstall of sqeeze) imagick is so incredible slow that it simply shuts down my server. I have several image galleries which use imagick to create thumbs. 50 images needed less then 30 seconds (2000x1200 pixel) on lenny. NOW it needs more than an hour.. Processor is at 100% for the complete time making other processes like apache very slow. is this a known bug in squeeze? it is

Programmatically divide scanned images into separate images

亡梦爱人 提交于 2019-12-21 19:38:10
问题 In order to improve OCR quality, I need to preprocess my scanned images. Sometimes I need to OCR the image with few pictures (components on the page and they are at different angles - for example, a few paper documents scanned at one time), for example: Is it possible to automatically programmatically divide such images into separate images that will contain every logical document? For example with a tool like ImageMagick or something else? Is there any solutions/technics exists for such

ImageMagick best fit text within rectangle?

会有一股神秘感。 提交于 2019-12-21 18:30:15
问题 I have an image like this, with a rectangle at specific coordinates: (for illustratory purposes I put the coordinates of the rectangle and its size and center in there) Now I want to render some text with ImageMagick, so that it fits exactly within the rectangle . If it's a very short (narrow) string, the rectangle's height will be the limiting factor: On the other hand with a long (wide) string, the rectangle's width will determine the size: In either case, independent of how short or long

Why does “convert x.png y.png” creates an image with a different size (KB)?

折月煮酒 提交于 2019-12-21 17:54:40
问题 I have a few images I'm trying to normalize to a certain scale by resizing them. When I started resizing the images, I noticed that their volume (KB) became much larger than the original image. I checked it out further by simply doing: convert x.png y.png And got some difference. E.g. in one case x.png is 143KB and y.png is 208KB. Since I'm also optimizing for image size, I was wondering if anyone has an idea why this is the case and any suggestions to solve this. I'm using Imagemagick 6.6.4

Imagick: Remove frames from an animated GIF?

左心房为你撑大大i 提交于 2019-12-21 16:59:04
问题 I am trying to understand how to remove frames from an animated GIF. Currently I am trying this (as a test): $count = 1; foreach ($_im AS $frame) { if ($count > 1) { $frame->removeImage(); } $count++; } However this seems to toast everything in the object. Suggestions from workmates have been to just create another IM object, and extract a famee into it, etc. That seems extremely messy however. 回答1: I've been going through the Imagick documentation for a while, and tried a couple of things...

Can't upload image using Paperclip 4.0 Rails 3

限于喜欢 提交于 2019-12-21 16:57:22
问题 I've installed ImageMagick and I've installed the gem Paperclip (version 4.0). I've added: Paperclip.options[:command_path] = 'C:\Program Files\ImageMagick-6.8.8-Q16' to the development.rb My photo.rb Model has this: has_attached_file :image validates_attachment_content_type :image, :content_type => ['image/jpeg', 'image/png', 'image/jpg'] I can choose a file in photos/new.html.erb but once I click on 'Create photo' button, the page reloads with a Paperclip specific error message saying: 1

Can't upload image using Paperclip 4.0 Rails 3

泄露秘密 提交于 2019-12-21 16:57:04
问题 I've installed ImageMagick and I've installed the gem Paperclip (version 4.0). I've added: Paperclip.options[:command_path] = 'C:\Program Files\ImageMagick-6.8.8-Q16' to the development.rb My photo.rb Model has this: has_attached_file :image validates_attachment_content_type :image, :content_type => ['image/jpeg', 'image/png', 'image/jpg'] I can choose a file in photos/new.html.erb but once I click on 'Create photo' button, the page reloads with a Paperclip specific error message saying: 1

ImageMagick or GhostScript: convert a multi-page TIFF to a multi-page PDF

南笙酒味 提交于 2019-12-21 11:36:49
问题 I need to convert a multi-page TIFF to a multi-page PDF. I have access to ImageMagick and GhostScript (in *nix environment). How do I do this? Thanks. UPDATE: It turns out that my test file was wrong (it didn't have multiple pages), which made me think my command was wrong. This seems to work for me: convert input.tif output.pdf 回答1: Use a tool called tiff2ps from the tool set provided by libtiff: http://www.libtiff.org/tools.html Once you have the tiff in ps format, you can call ps2pdf to

ImageMagick works in command line but when exec() in php it returns 5 with “incompatible library version”

巧了我就是萌 提交于 2019-12-21 09:31:58
问题 I'm having a bizarre problem with php 5.3.6 and ImageMagick (command line) using MAMP (and Macports too..I tried both) on OS X. When I run the identify command from the CLI, it works fine. But when I run the exact same command using exec() , it returns a value code of 5 and in the apache error logs I have: dyld: Library not loaded: /opt/local/lib/libfreetype.6.dylib Referenced from: /opt/local/bin/identify Reason: Incompatible library version: identify requires version 14.0.0 or later, but

Which EXIF tag to store keyword/tag for a photo?

扶醉桌前 提交于 2019-12-21 04:41:37
问题 I am developing a photo gallery which will read/write EXIF tags. I will put photo title in the EXIF tag DocumentName and description in EXIF tag ImageDescription. I also plan to use the geo-tags. But what about photo tags/categories? I want to store a space-separated string of the tags a photo is tagged with in my system. Is there any EXIF tag that is normally used for this type of information? I could write my own (i.e. PhotoTags) but I guess that is not really of any use except for