Search found 49 matches

by BrianP007
2015-06-19T23:17:53-07:00
Forum: PerlMagick
Topic: Copy_Pixels(sx, sy, width, height, dx, dy)
Replies: 9
Views: 16152

Re: Copy_Pixels(sx, sy, width, height, dx, dy)

PerlMagick needs a SetAuthenticPixels() for fast direct update access to the image pixels. We'll work on that. We'll also add a CopyPixels() method. However, in the mean-time you'll need to use GetPixels() / SetPixels() to copy pixels to and from an image. For the ~18 copies, I use a short line and...
by BrianP007
2015-06-19T15:09:21-07:00
Forum: PerlMagick
Topic: Copy_Pixels(sx, sy, width, height, dx, dy)
Replies: 9
Views: 16152

Copy_Pixels(sx, sy, width, height, dx, dy)

I have a ~256 lines of pixels with complicated colors ~800 pixels long. I need to copy each line up to a dozen times to make columns > 1 pixel wide. I will create the original lines one pixel at a time as I need to do extensive calculations on each. Is there any way to copy a rectangular area of pix...
by BrianP007
2015-06-14T18:26:54-07:00
Forum: PerlMagick
Topic: Create a PNG with a transparent background with PerlMagick
Replies: 1
Views: 5861

Create a PNG with a transparent background with PerlMagick

It took a good bit of groping the web to get enough pieces to put together code to create a PNG file with a transparent background. And then suddenly, it turned to white. No idea why. While it is stable, here's the recipe: use Image::Magick; #use strict; # im.test.transparent.png.pl 2>&1 | grep -v "...
by BrianP007
2015-05-20T13:48:43-07:00
Forum: PerlMagick
Topic: How to create an image from scratch?
Replies: 6
Views: 19041

Re: How to create an image from scratch?

>> It seems you need to create the image by reading from something, and there's a built-in 'canvas' source for this: ... >> Not at all obvious from the error message, and the Perl API docs are poorly organised to learn about it. Confirmed. I can not draw a line unless I execute: $image->ReadImage('c...
by BrianP007
2015-01-23T14:03:23-07:00
Forum: Users
Topic: Convert.exe file.NEF file.jpg destroys ALL EXIF data
Replies: 0
Views: 3024

Convert.exe file.NEF file.jpg destroys ALL EXIF data

Hi, This was fixed in IM ver 6.5 but is baaaaaaaack Conversion from .CR2 or .NEF to .JPG completely removes EXIF This problem was reported previously. We have a patch in ImageMagick 6.5.4-10, the latest release. All of the original NEF EXIF is gone. What's left is OS level junk and maybe some identi...
by BrianP007
2015-01-15T00:38:37-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

Unfortunately, that does not help if you don't have a GPU or GPU algorithm. Can you contribute that into an OpenCL implementation for IM? Did you ever try coding into Perlmagick. It probably is faster. Or use OpenMP with multiple threads, if you have a multicore system? >> ".. you don't have a GPU ...
by BrianP007
2015-01-14T18:48:09-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

This is 4 years old. Every kernel only works on a tiny radius and is totally independent of that kernel way over there. It's like Hoeing your garden. Mo Hoes, mo better! A Chunking Method for Euclidean Distance Matrix Calculation on Large Dataset Using Multi-GPU http://ieeexplore.ieee.org/xpl/login....
by BrianP007
2015-01-14T10:31:17-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

If you find -morphology Distance "Euclidean:7,6^!" too slow, you could reduce the 7 to 4 or other number. You might try different distance kernels such as Chebyshev. See http://www.imagemagick.org/Usage/morphology/#distance_kernels I was wondering about that. In Photoshop, the select, expand and fe...
by BrianP007
2015-01-13T23:24:04-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

I am sure there should be command in Perlmagick that are equivalent to the command line. But they will not be options for one command. They will be separate commands. The command line processes the image in sequence with these commands above. I do not know Perlmagick and do not know if it supports ...
by BrianP007
2015-01-13T22:42:05-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

black.white.mask.tif isn't only black and white, so I'm not sure what you are asking. We can threshold it at 50%, then get a gradient (Windows cmd syntax): convert black.white.mask.tif -threshold 50% -morphology Distance "Euclidean:7,6^!" f.tiff Adjust "6" as desired. Leave "7" alone. I adjusted th...
by BrianP007
2015-01-13T21:00:23-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Re: Smooth Feathering from black to white over ~6 pixel distance

FMW42, This one looks like just what I need. convert test.png -negate +level 0,100 -white-threshold 99 -morphology Distance Euclidean:4,20! -negate test4.png When I did a Euclidean:4 kernel and a distance method, it did the entire picture, not just the areas around the black/white interfaces. $err=$...
by BrianP007
2015-01-13T15:10:06-07:00
Forum: Users
Topic: Smooth Feathering from black to white over ~6 pixel distance
Replies: 13
Views: 8654

Smooth Feathering from black to white over ~6 pixel distance

Hi, How does one take a Black & White, grayscale/16bit, Threshold mask and gradually "dissolve" a ~6 pixel border at the edge of the black where it touches the white without graying the interior blacks far away from any white? I have a grayscale, 16bit Threshold mask containing only black and white....
by BrianP007
2015-01-12T20:54:43-07:00
Forum: Users
Topic: Convert ... (+clone 0 ...
Replies: 2
Views: 2506

Convert ... (+clone 0 ...

Snibgo, I was researching your original Convert command to restore blacks: convert ^ original.tiff ^ bad_black.tiff ^ ( +clone 0 -colorspace Gray -level 0,5%% ^ -write mask.tiff ^ ) ^ -composite ^ out.tiff The CLONE op, you specify the first image, index 0. But, with +CLONE: "The +clone will simply ...
by BrianP007
2015-01-12T20:19:14-07:00
Forum: Users
Topic: Easiest way to delete pixels with mask like PS->select_color_range; delete
Replies: 1
Views: 2064

Easiest way to delete pixels with mask like PS->select_color_range; delete

I ran new software, Perfectly Clear, on thousands of stock images and it Carpet Bombed everything near the left side of the histogram to pure, (0,0,0), black. Large chunks of shadows look as though they have been redacted with India Ink. I am trying to devise an automated method to make the nigrifie...
by BrianP007
2015-01-11T00:20:15-07:00
Forum: Users
Topic: convert in_file -crop $GEOM -write output_file -> Error missing output_file??
Replies: 6
Views: 4035

Re: convert in_file -crop $GEOM -write output_file -> Error missing output_file??

OK. I see the pattern. And it explains the error message. convert INPUT_FILE [options ... ] OUTPUT_FILE <enter> ... Option `-WRITE filename` may be used to write intermediate results as the command is executed in chunks! Very handy. The output_file was being absorbed by the option -write leaving the...