Search Results

Search found 329 results on 14 pages for 'imagemagick'.

Page 7/14 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Gmagick extension for php install -- how and where?

    - by Vivek Chandra
    Downloaded php-pear and tried installing gmagick extension by following the steps given in link "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu" The pecl gave an error -- gmagick-1.0.9b1$ pecl install gmagick Failed to download pecl/gmagick within preferred state "stable", latest release is version 1.0.9b1, stability "beta", use "channel://pecl.php.net/gmagick-1.0.9b1" to install install failed Tried adding the channel (no result)-- gmagick-1.0.9b1$ pecl channel-add http://pecl.php.net/package/gmagick/1.0.9b1 Error: No version number found in tag channel-add: invalid channel.xml file Found the link "http://pecl.php.net/package/gmagick" to download the php extension untar'd it to find the following files -- gmagick-1.0.9b1$ ls config.m4 gmagickdraw_methods.c gmagick_methods.c LICENSE php_gmagick_helpers.h README gmagick.c gmagick_helpers.c gmagickpixel_methods.c php_gmagick.h php_gmagick_macros.h Tried . / config.m4 only to find more errors gmagick-1.0.9b1$ . / config.m4 ./config.m4: line 1: syntax error near unexpected token `gmagick,' ./config.m4: line 1: `PHP_ARG_WITH(gmagick, whether to enable the gmagick extension,' Been at this since a day with no result.Read that gmagick is a swiss knife of image processing,sad that there isnt much documentation done on it or at least a proper how to install link anywhere. Badly need help. Thanks in advance.

    Read the article

  • attachment_fu and RMagick

    - by trobrock
    After finally getting RMagick installed on my Mac I have set up attachment_fu according to the tutorial here: http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu&gt when I try and upload a file via the upload form I get around 80 messages like these: /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:44: warning: already initialized constant PercentGeometry /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:45: warning: already initialized constant AspectGeometry /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:46: warning: already initialized constant LessGeometry /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:47: warning: already initialized constant GreaterGeometry I did some searching and found that this problem can arise when you require RMagick twice in an application using different casing for the require statement: http://work.rowanhick.com/2007/12/19/require-rmagick-and-case-sensitivity/ I am not requiring it myself, but I was thinking maybe with the config.gem "rmagick" line in my environment.rb file rails might be requiring it. After the form submits it gives me a validation error of: Content type is not included in the list I have checked the source for attachement_fu and found the image/png in the list of content types so I don't believe that is the proper error message: http://github.com/technoweenie/attachment_fu/blob/master/lib/technoweenie/attachment_fu.rb Does anyone have any ideas on how I can get this to work?

    Read the article

  • Create a thumbnail of a dwg in in a linux environment

    - by Kyle
    Creating a ruby on rails site that uses RMagick to create thumbnails for many types of images. RMagick cannot read dwg files however. I've tried a few things, looked into the Java library JDWGLib, which would probably allow me to write a converter, but it would be a total from the ground up solution, where I just need a thumbnail. Also considered using a viewer program to open the file in a remote X session and do a screen capture, however I'm not sure how I could ever guarantee that the viewer had completed opening when I took the screenshot. I'm not concerned with being able to manipulate the file other than to create the thumbnail. It is going to be used for commercial purposes, so any libraries used need to be compatible.

    Read the article

  • Create a bitonal image for OCR using Image Magick

    - by Greg
    nice /usr/local/bin/convert -colors 2 -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg This command worked with a really OLD version of Image Magick. With the newest version this method produces a completely black image. nice /usr/local/bin/convert -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg nice /usr/local/bin/convert -colors 2 /var/www/html/uploads/pokemontest.jpg /var/www/html/uploads/pokemontestfinal.jpg This results in a bitonal gray and black image, but it's really rough. NOT clean at all.

    Read the article

  • RMagick returns nil reading JPEG

    - by ysproduction
    When I try to open a JPEG format file in Rails using RMagick, it always return nil with any jpg file. Other file formats open well. $ script/console Loading development environment (Rails 2.3.4) >> require 'RMagick' >> img = Image.read("1.gif").first => 1.gif GIF 230x100 230x100+0+0 PseudoClass 256c 8-bit 2kb >> img = Image.read("1.png").first => 1.png PNG 1280x800 1280x800+0+0 DirectClass 8-bit 156kb >> img = Image.read("1.jpg").first => nil Why this happens?

    Read the article

  • Get used color names from image

    - by atmorell
    Hello, I would like to check what colors is present in a image. This will be stored in the database and used for a search form. (red=1, green=1, blue=0, yellow=1, black=1, white=1 etc.) img = Magick::Image.read('phosto-file.jpg').first img = img.quantize(10 h = img.color_histogram pp h {red=12815, green=18494, blue=15439, opacity=0=>13007, red=44662, green=47670, blue=51967, opacity=0=>18254, red=17608, green=43331, blue=48321, opacity=0=>11597, red=21105, green=25865, blue=39467, opacity=0=>10604, red=15125, green=36629, blue=22824, opacity=0=>10223, red=52102, green=42405, blue=10063, opacity=0=>12928, red=39043, green=28726, blue=40855, opacity=0=>7728, red=10410, green=8880, blue=7826, opacity=0=>13795, red=25484, green=25337, blue=24235, opacity=0=>7351, red=44485, green=12617, blue=11169, opacity=0=>14513} How do I convert the 10 values to color names? red, green, NOMATCH, yellow, black, white etc. Only need the rough color name - not LimeGreen but Green etc. Best regards. Asbjørn Morell

    Read the article

  • Prevent image cropping when making sprites from gif

    - by OSaad
    Hey guys I've tried several tools (imagemagic, gif2png, Nconverter) to extract frames to make sprites from a .gif image that i have. I get the .pngs just fine, but they'r not the same size, some are 50x65 some 43x65 some 50x70, Which really screws any attempts at a descent animation. So is there a way to prevent this cropping or programmatically add extra transparent space to smaller ones and make them all the same size? Thanks.

    Read the article

  • Create a thumbnail of a dwg in in a linux envrionment

    - by Kyle
    Creating a ruby on rails site that uses RMagick to create thumbnails for many types of images. RMagick cannot read dwg files however. I've tried a few things, looked into the Java library JDWGLib, which would probably allow me to write a converter, but it would be a total from the ground up solution, where I just need a thumbnail. Also considered using a viewer program to open the file in a remote X session and do a screen capture, however I'm not sure how I could ever guarantee that the viewer had completed opening when I took the screenshot. I'm not concerned with being able to manipulate the file other than to create the thumbnail. It is going to be used for commercial purposes, so any libraries used need to be compatible.

    Read the article

  • PDF to PNG Processor - Paperclip

    - by Josh Crowder
    I am trying to develop a system in which a user can upload a slideshow (pdf) and it'll export each slide as a png. After some digging around I came across a post on here that suggested using a processor. I've had a go, but I cant get the command to run, if it is running then I don't know what is happening because no errors are being shown. Any help would be appreciated! module Paperclip class Slides < Processor def initialize(file, options = {}, attachment = nill) super @file = file @instance = options[:instance] @current_format = File.extname(@file.path) @basename = File.basename(@file.path, @current_format) end def make dst = Tempfile.new( [ @basename, @format].compact.join(".")) dst.binmode command = <<-end_command -size 640x300 #{ File.expand_path(dst.path) } tester.png end_command begin success = Paperclip.run("convert", command.gsub(/\s+/, " "))) rescue PaperclipCommandLineError raise PaperclipError, "There was an error processing the thumbnail for #{@basename}" end end end end I think my problem is with the convert command... When I run that command by hand, it works but it doesn't give the details of each slide it just executes it. What I need to happen is once its made all the slides, pass back the data to a new model... or I know where all the slides are, but once I get to that point I'm not sure what todo.

    Read the article

  • Outputing resized animated gif to browser using imagick

    - by Freeman
    I intent to resize an animated gif and outputing it to the browser on-the-fly. My problem is that when I save the resized image it is of good quality, but if I echo it to the browser it is of poor quality and the animation is removed. Here is the code:` header("Content-type:image/gif"); try { /* Read in the animated gif */ $animation = new Imagick("images/nikks.gif"); /*** Loop through the frames ***/ foreach ($animation as $frame) { /*** Thumbnail each frame ***/ $frame->thumbnailImage(200, 200); /*** Set virtual canvas size to 100x100 ***/ $frame->setImagePage(200, 200, 0, 0); } /*** Write image to disk. Notice writeImages instead of writeImage ***/ //$animation->writeImages("images/nikkyo1.gif",true); echo $animation; } catch(Exception $e) { echo $e-getMessage(); } `

    Read the article

  • What's the best way to convert a .eps (CMYK) to a .jpg (RGB) with Image Magick

    - by Slinky
    Hi All, I have a bunch of .eps files (CMYK) that I need to convert to .jpg (RGB) files. The following command sometimes gives me under or over saturated .jpg images, when compared to the source EPS file: $cmd = "convert -density 300 -quality 100% -colorspace RGB ".$epsURL." -flatten -strip ".$convertedURL; Is there a smarter way to do this such that the converted image will have the same qualities as the source EPS file? Here is an example of the source file info: Image: rejm.eps Format: PS (PostScript) Class: DirectClass Geometry: 537x471 Base geometry: 1074x941 Type: ColorSeparation Endianess: Undefined Colorspace: CMYK Channel depth: Cyan: 8-bit Magenta: 8-bit Yellow: 8-bit Black: 8-bit Channel statistics: Cyan: Min: 0 (0) Max: 255 (1) Mean: 161.913 (0.634955) Standard deviation: 72.8257 (0.285591) Magenta: Min: 0 (0) Max: 255 (1) Mean: 184.261 (0.722591) Standard deviation: 75.7933 (0.297229) Yellow: Min: 0 (0) Max: 255 (1) Mean: 70.6607 (0.277101) Standard deviation: 39.8677 (0.156344) Black: Min: 0 (0) Max: 195 (0.764706) Mean: 34.4382 (0.135052) Standard deviation: 38.1863 (0.14975) Total ink density: 292% Colors: 210489 Rendering intent: Undefined Resolution: 28.35x28.35 Units: PixelsPerCentimeter Filesize: 997.727kb Interlace: None Background color: white Border color: #DFDFDFDFDFDF Matte color: grey74 Page geometry: 537x471+0+0 Dispose: Undefined Iterations: 0 Compression: Undefined Orientation: Undefined Signature: 8ea00688cb5ae496812125e8a5aea40b0f0e69c9b49b2dc4eb028b22f76f2964 Profile-iptc: 19738 bytes Thanks

    Read the article

  • Python Daemon Subprocess not working at boot

    - by Adam Richardson
    I am attempting to write a python daemon that will launch at boot. The goal of the script is to receive a job from our gearman load balancing server and complete the job. I am using the python-daemon module from pypi (http://pypi.python.org/pypi/python-daemon/). The nature of the job that it is completing is converting images in the orf (olympus raw image format) to jpeg. In order to accomplish this an outside program is used, ufraw in this case. The problem comes in when I start the daemon at boot, if I launch from the shell it runs perfectly and completes the work. When it starts at boot it is unable to launch the subprocess command. commandString = '/usr/bin/ufraw-batch --interpolation=four-color --wb=camera --compression=100 --output="' + outfile + '" --out-type=jpg --overwrite "' + infile + '"' args = shlex.split(commandString) process = subprocess.Popen(args).wait() I am not sure what I am doing wrong. Thanks for any help.

    Read the article

  • Magick++ Read Image with ICC colorspace

    - by FlashFan
    Hi guys I need to know how I can read an image which uses a separate ICC Color Profile. The image consists of 26'099'520 Bytes which is the result of 2480 width* 3508 height * 3 components per pixel. I tried it with the following code: Image * image = new Image(); Blob * blob = new Blob(imagedata.c_str(),imagedata.length()); image->read(*blob,Geometry(2480,3508),8,"RGB"); Blob * iccblob = new Blob(iccdata.c_str(),iccdata.length()); image->iccColorProfile(*iccblob); image->write("result.jpg"); But the colors are the same as when I don´t set the Icc-profile to the image. And the colors are wrong in both cases. Thanks for your help!

    Read the article

  • PHP weirdness extending IMagick class

    - by Jamie Carl
    This is a really weird one. I have some code that is happily working on version 2.1.1RC1 of the php5-imagick module. It's basically just a class I wrote that extends the Imagick class and manages images stored in a database. Since upgrading to version 3.0.0RC1 (thankfully only on my dev box) things have gone to hell. It seems that object members are writeable but are NOT readable. Take the following sample code: class db_image extends IMagick { private $data; function __construct( $id = null ){ parent::__construct(); $this->data = 'some plain text'; echo $this->data; } This will output absolutely NOTHING. My debugger indicates that the contents of $this-data are the correct string value, but I am unable to read the value back out of the member variable. Seriously. WTF? Does anyone know what is causing this or has seen it before? I don't even know how to replicate this behaviour in my own classes.

    Read the article

  • Imagick: gifs, and background color

    - by TheButch3r
    Hi, I have 2 questions about using the php imagick class that I can't get working properly... 1.) I tried resizing / cropping a gif, and treated it as a normal image. It seemed to work, except that a few frames in the middle of the animation contained a small patch of artifacts. Is there a setting that should be used when working with multi-frame gifs? 2.) Is there a simple command to resize images if they are too small by just adding a background? For instance, if an image is 10x10, could I add a white background, and have a 100x100px image with the original in the upper left corner? Thanks for any help!

    Read the article

  • image magick please help he

    - by Libi
    system(' convert -size 320x100 xc:lightblue -font Candice -pointsize 72 \ -fill navy -annotate +25+65 \'Anthony\' \ -distort Arc 120 -trim +repage \ -bordercolor lightblue -border 10 font_arc.jpg '); curving text like arc This code is not working please help me

    Read the article

  • Run command with space characters in bash script

    - by ??iu
    I have a file that contains a list of files: 02 of Clubs.eps 02 of Diamonds.eps 02 of Hearts.eps 02 of Spades.eps ... I am attempting to mass-convert these to png format in several sizes. The script I am using to do this is: while read -r line do for i in 80 35 200 do convert $(sed 's/ /\\ /g' <<< Cards/${line}) -size ${i}x${i} ../img/card/$(basename $(tr ' ' '_' <<< ${line} | tr '[A-Z]' '[a-z]') .eps)_${i}.png; done done < card_list.txt However, this doesn't work, apparently trying to split on each word, resulting in the following error output: convert: unable to open image `Cards/02\': No such file or directory @ error/blob.c/OpenBlob/2514. convert: no decode delegate for this image format `Cards/02\' @ error/constitute.c/ReadImage/532. convert: unable to open image `of\': No such file or directory @ error/blob.c/OpenBlob/2514. convert: no decode delegate for this image format `of\' @ error/constitute.c/ReadImage/532. convert: unable to open image `Clubs.eps': No such file or directory @ error/blob.c/OpenBlob/2514. If I change the convert to an echo the result looks right and if I copy a line and run it myself in the shell it works fine: convert Cards/02\ of\ Clubs.eps -size 80x80 ../img/card/02_of_clubs_80.png convert Cards/02\ of\ Clubs.eps -size 35x35 ../img/card/02_of_clubs_35.png convert Cards/02\ of\ Clubs.eps -size 200x200 ../img/card/02_of_clubs_200.png convert Cards/02\ of\ Diamonds.eps -size 80x80 ../img/card/02_of_diamonds_80.png convert Cards/02\ of\ Diamonds.eps -size 35x35 ../img/card/02_of_diamonds_35.png convert Cards/02\ of\ Diamonds.eps -size 200x200 ../img/card/02_of_diamonds_200.png convert Cards/02\ of\ Hearts.eps -size 80x80 ../img/card/02_of_hearts_80.png convert Cards/02\ of\ Hearts.eps -size 35x35 ../img/card/02_of_hearts_35.png convert Cards/02\ of\ Hearts.eps -size 200x200 ../img/card/02_of_hearts_200.png convert Cards/02\ of\ Spades.eps -size 80x80 ../img/card/02_of_spades_80.png UPDATE: Just adding quotes (see below) has the same result as the above, where I had been using sed to add backslashes convert '"'Cards/${line}'"' -size ${i}x${i} ../img/card/$(basename $(tr ' ' '_' <<< ${line} | tr '[A-Z]' '[a-z]') .eps)_${i}.png; I've tried both double and single quotes

    Read the article

  • Set a color as transparent in palette-based image

    - by NeDark
    Hello there! I want to convert a alpha transparent png image to palette based png image. In GD I can do it easy: // We have already the image loaded in $source_img $w=200; $h=200; // We supose that img dimensions are 200x200 $img = imagecreatetruecolor($w, $h); // New black image list($r, $g, $b) = array(200, 200, 200); // Some color that doesn't appear in image to avoid conflict $color = imagecolorallocate($img, $r, $g, $b); imagefill($img, 0, 0, $color); // Fill the black image with the chosen color. imagecolortransparent($img, $color); // Set the chosen color as transparent $res = imagecopyresampled($img, $source_img, 0, 0, 0, 0, $w, $h, $w, $h); But in Imagick I don't know how set a color as transparent (imagecolortransparent() in GD). I have spent hours searching on the internet, but the help in the php site isn't very comphrensive and there are many undocumented functions. Thanks.

    Read the article

  • How do you crop a specific area with paperclip in Rails (3)?

    - by Smickie
    Hi, I have paperclip in Rails (3) working with simple cropping, for example the blow code makes a simple crop of the thumbnail: has_attached_file :image, :styles => { :thumb => "90x90#" }, :default_style => :thumb However I was wondering how do you crop a very specific area of an image; lets say you have an x and y coordinate to start from and then a width and height of the crop. How do you go about passing a complex style like this in? Thanks very much.

    Read the article

  • Imagemagik Change an images dpi from 400 to 72

    - by rhousham
    I have an image on my server which I know the dpi of and if it's too high I want to size it down to 72 I still want to keep the same height and width of the image. Any ideas? I've played around with -resample -units and -density but don't seem to be getting anywhere and can't find any answers. Anyone out there that can help

    Read the article

  • Jmagick rounding corners

    - by SPC
    Hello, I've a question concerning Jmagick, how can I round corners of an image, and does this make sense or would it be better to do this using CSS in HTML ? Thanks

    Read the article

  • Delayed Jobs is not finding Records and failing..

    - by Trip
    In my app, delayed jobs isn't running automatically on my server anymore. It used to.. When I manually ssh in, and perform rake jobs:work I return this : * Starting job worker host:ip-(censored) pid:21458 * [Worker(host:ip-(censored) pid:21458)] acquired lock on PhotoJob * [JOB] host:ip-(censored) pid:21458 failed with ActiveRecord::RecordNotFound: Couldn't find Photo with ID=9237 - 4 failed attempts This returns roughly 20 times over for what I think is several jobs. Then I get a few of these: [Worker(host:ip-(censored) pid:21458)] failed to acquire exclusive lock for PhotoJob And then finally one of these : 12 jobs processed at 73.6807 j/s, 12 failed ... Any ideas what I should be mulling over? Thanks so much!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >