Search found 21 matches

by ggking7
2013-05-23T22:06:39-07:00
Forum: Users
Topic: Correct resize dimensions?
Replies: 13
Views: 16886

Re: Correct resize dimensions?

GreenKoopa, I checked my code and I use that same formula to calculate the height and width. I think I'm running into trouble when rounding to the nearest pixel for each dimension. Your example here works for me: convert in.jpg -format "%wx%h" info: Is that a good way to go for this? How can I use ...
by ggking7
2013-05-23T11:05:50-07:00
Forum: Users
Topic: Correct resize dimensions?
Replies: 13
Views: 16886

Re: Correct resize dimensions?

Should I just use the Image::Size perl module (for example) to get the dimensions of the first image so I can crop the second image to the same size? Otherwise I'm not sure how to crop the second image to the same dimensions that the first image was resized to.
by ggking7
2013-05-22T20:41:29-07:00
Forum: Users
Topic: Correct resize dimensions?
Replies: 13
Views: 16886

Re: Correct resize dimensions?

I'm trying to resize an image to a pixel count limit and a maximum width and height, then resize the original image to a new pixel count limit equal to twice the actual pixel count of the previously resized image, and finally crop the second resized image to the same dimensions as the first resized ...
by ggking7
2013-05-22T17:58:39-07:00
Forum: Users
Topic: Correct resize dimensions?
Replies: 13
Views: 16886

Correct resize dimensions?

How can I calculate the correct dimensions for resizing an image to a certain target surface area and maintain the correct aspect ratio? I'm on the road right now and don't have access to my code but it involves a square root and some arithmetic. The problem is sometimes either the width or height ...
by ggking7
2013-05-11T14:06:52-07:00
Forum: Users
Topic: Expand canvas to fit text?
Replies: 7
Views: 9370

Re: Expand canvas to fit text?

the +20+80 are the offsets from the -gravity setting. So if -gravity center, then the "center of the text" will be moved to that offset from the center of the image. If no -gravity is specified then the top left corner of the text will be offset relative to the upper left corner of the image ...
by ggking7
2013-05-10T18:00:32-07:00
Forum: Users
Topic: Expand canvas to fit text?
Replies: 7
Views: 9370

Re: Expand canvas to fit text?

Too easy! It's working great. How can I add a white dot to each corner? I was using -draw in the code I posted but I no longer know the size of the canvas since it's trimmed around the text. Am I correct that the two links which fmw42 posted are for resizing text to a canvas as opposed to resizing a ...
by ggking7
2013-05-09T23:13:29-07:00
Forum: Users
Topic: Expand canvas to fit text?
Replies: 7
Views: 9370

Re: Expand canvas to fit text?

Thanks for those links. I can see how to size the canvas around some text. How can I leave enough empty space only on the left side of the canvas in order to place an image there? I'm currently placing the image with the second line in my original post.
by ggking7
2013-05-07T19:48:41-07:00
Forum: Users
Topic: Expand canvas to fit text?
Replies: 7
Views: 9370

Expand canvas to fit text?

Can I have the canvas automatically expand or contract horizontally on the right side to fit the width of the text in the following example? convert -size 98x28 xc:"black" -font Verdana -pointsize 14 -fill black -draw "text 30,20 'test'" -bordercolor black -border 1x1 -fill white -draw 'color 0,0 ...
by ggking7
2012-09-21T17:57:02-07:00
Forum: PerlMagick
Topic: convert command -> PerlMagick
Replies: 6
Views: 24203

Re: convert command -> PerlMagick

Thank you, can you translate this into PerlMagick:

+channel -background white
by ggking7
2012-05-24T23:03:12-07:00
Forum: PerlMagick
Topic: convert command -> PerlMagick
Replies: 6
Views: 24203

Re: convert command -> PerlMagick

Can you tell me how this is done in PerlMagick or point me in the right direction?

+channel -background white -flatten
by ggking7
2012-05-24T11:39:14-07:00
Forum: PerlMagick
Topic: convert command -> PerlMagick
Replies: 6
Views: 24203

Re: convert command -> PerlMagick

Should this: $image->Set(alpha=>'Set'); $image->Set('virtual-pixel'=>'Transparent'); $image->Blur(geometry=>'0x10',channel=>'A'); $image->Level(levels=>'50%,100%',channel=>'A'); be the equivalent of this: convert image.jpg -alpha set -virtual-pixel transparent -channel A -blur 0x10 -level 50%,100 ...
by ggking7
2012-05-20T13:14:24-07:00
Forum: PerlMagick
Topic: convert command -> PerlMagick
Replies: 6
Views: 24203

convert command -> PerlMagick

Try as I might, I can't come up with the PerlMagick equivalent of this command: convert image.jpg -alpha set -virtual-pixel transparent -channel A -blur 0x10 -level 50%,100% +channel -background white -flatten -quantize RGB -quality 85 converted-image.jpg Can anyone show me how to do this in ...
by ggking7
2012-05-11T00:52:40-07:00
Forum: Users
Topic: convert command stopped working (partially)
Replies: 6
Views: 12219

Re: convert command stopped working (partially)

Upgrading to 6.7.6.9 fixed it. Thank you!
by ggking7
2012-05-09T04:28:02-07:00
Forum: Users
Topic: convert command stopped working (partially)
Replies: 6
Views: 12219

Re: convert command stopped working (partially)

Here is an image: http://oi45.tinypic.com/2ccwleo.jpg Here is the image after running it through convert via the command line: http://oi49.tinypic.com/votu12.jpg Here is the convert command which used to only soften the edges of the image: convert image.jpg -alpha set -virtual-pixel transparent ...
by ggking7
2012-05-07T00:28:11-07:00
Forum: Users
Topic: convert command stopped working (partially)
Replies: 6
Views: 12219

Re: convert command stopped working (partially)

Thanks, I tried the following: system(qq{convert images/"$sku".jpg -resize "$width"x"$height" -alpha set -virtual-pixel transparent -channel A -negate -blur 0x10 -level 50%,100% +channel -background white -flatten -quantize RGB -quality 85 /path/to/new/file/"$sku".jpg}); but the result now looks the ...