Search found 10157 matches

by snibgo
2018-05-27T08:46:17-07:00
Forum: Users
Topic: how to achieve overlay result as shown
Replies: 2
Views: 18

Re: how to achieve overlay result as shown

A simple composite does most of what you want:

Code: Select all

magick bottom.jpg top.png -composite out.png
But this doesn't make the background outside the phone transparent. There are some ways of doing that, if you want, but they are complex to handle the anti-aliasing.
by snibgo
2018-05-27T05:48:48-07:00
Forum: Users
Topic: x,y coordinate transformation when image is rotated by 90 degrees
Replies: 1
Views: 22

Re: x,y coordinate transformation when image is rotated by 90 degrees

If we rotate an image of height (h) 90 degrees clockwise, a pixel that was at (x,y) will be in new location (x',y') where:

x' = h - 1 - y
y' = x
by snibgo
2018-05-26T13:58:56-07:00
Forum: MagickWand
Topic: Image Magick with Lazarus not working after update.
Replies: 4
Views: 66

Re: Image Magick with Lazarus not working after update.

I don't know how Pascal or Lazarus interact with IM. When I write a C or CPP program that calls IM functions, I need to move the compiled binary (.exe) file to the IM installation, or it complains it can't find DLLs. I expect symbolic links could be used instead of physically copying files. This is ...
by snibgo
2018-05-26T07:49:45-07:00
Forum: MagickWand
Topic: Image Magick with Lazarus not working after update.
Replies: 4
Views: 66

Re: Image Magick with Lazarus not working after update.

Has Lazarus been updated for ImageMagick v7? I guess your previous installation was v6. If so, try de-installing IM v7 and install the current v6.
by snibgo
2018-05-26T04:54:14-07:00
Forum: Magick.NET
Topic: Output Colour Profile has opposite effect to desired
Replies: 3
Views: 125

Re: Output Colour Profile has opposite effect to desired

I first remove any other profiles that are on the images ... Why? A profile defines the colours that pixel numbers represent, so when you remove a profile, you (and ImageMagick, and your printer) no longer know what colour to make. You have a profile for the printer, yes? What documentation came wi...
by snibgo
2018-05-25T12:39:24-07:00
Forum: Magick.NET
Topic: Output Colour Profile has opposite effect to desired
Replies: 3
Views: 125

Re: Output Colour Profile has opposite effect to desired

1. Printers usually have a printer driver, which is software that you send the image to. The driver expects its input to be a certain colorspace, or to have an embedded profile, or whatever. It then tweaks the image as required and sends it to the printer. 2. You say "When I apply the colour profile...
by snibgo
2018-05-25T07:00:31-07:00
Forum: Users
Topic: Interactive image editing with journaling
Replies: 2
Views: 61

Re: Interactive image editing with journaling

vinaad wrote:Is there any interactive editor which also outputs ImageMagick code which can then be saved for later re-use?
Yes, I've written a GUI for that. But I haven't published it (and I probably never will).
by snibgo
2018-05-25T04:13:19-07:00
Forum: Users
Topic: How to count/list all images in a dir tree with certain size or resolution?
Replies: 1
Views: 50

Re: How to count/list all images in a dir tree with certain size or resolution?

I would do it in a BAT script, like this: set TOTAL=0 set COUNT=0 for /R . %%F in (*.jpg) do ( for /F "usebackq" %%L in (`%IMG7%magick identify ^ -ping ^ -format "INC=%%[fx:w>=400||h>=200?1:0]" ^ %%F`) do set %%L set /A TOTAL += 1 set /A COUNT += !INC! ) echo TOTAL=%TOTAL% echo COUNT=%COUNT% This te...
by snibgo
2018-05-24T02:54:31-07:00
Forum: Users
Topic: How to make a "perfect grid" in BMP ? [solved]
Replies: 3
Views: 77

Re: How to make a "perfect grid" in BMP ?

wrote:BUT: when I create the grid, I get these odd squares where lines meet ...
If you show the command you used, perhaps we can diagnose the problem.

I draw grids with a script that draws a number of lines: Cylinders: grid.bat
by snibgo
2018-05-23T04:59:37-07:00
Forum: Users
Topic: How to remove transparency from a TIF and replace with white background
Replies: 23
Views: 623

Re: How to remove transparency from a TIF and replace with white background

Roman80 wrote:But it does also not work for TIF files and also not with your modified CPP program.
Both programs work fine with TIFF files made by ImageMagick. Those files have an alpha channel.

They don't work on the TIFF file you linked because that doesn't have an alpha channel.
by snibgo
2018-05-22T19:01:07-07:00
Forum: IMagick
Topic: Paths and rectangles off by one pixel.
Replies: 8
Views: 206

Re: Paths and rectangles off by one pixel.

So, if a rectangle from 4,7 to 4,7 should be drawn (as a single pixel) then I guess that similarly a line from 4,7 to 4,7 should also be drawn (as a single pixel)?
by snibgo
2018-05-22T14:48:08-07:00
Forum: Users
Topic: Detecting "nearly" grayscale
Replies: 3
Views: 106

Re: Detecting "nearly" grayscale

The S channel of HLS (or C channel of HCL) gives the saturation (or chroma), on a scale of 0.0 to 1.0. If the mean of this is low, the image is close to gray. However, an image that is totally gray except for a few high-saturation pixels will be, on average, nearly gray, so you might prefer to find ...
by snibgo
2018-05-22T13:29:56-07:00
Forum: IMagick
Topic: Paths and rectangles off by one pixel.
Replies: 8
Views: 206

Re: Paths and rectangles off by one pixel.

For those of us who don't use IMagick, it would help if you showed us the output from your code. Note that when drawing a path from one pixel to an adjacent pixel, both pixels are drawn. But when drawing from one pixel to the same pixel, a "zero-length path", no pixels are drawn. As IM deals with pi...
by snibgo
2018-05-22T12:14:00-07:00
Forum: Users
Topic: How to remove transparency from a TIF and replace with white background
Replies: 23
Views: 623

Re: How to remove transparency from a TIF and replace with white background

Roman80 wrote:With that info, is it possible to remove the transparency background?
Photoshop puts it there, and apparently only Photoshop can read it. If you want to remove it (rather than simply ignore it), Photoshop seems the best option.
by snibgo
2018-05-22T06:17:34-07:00
Forum: Users
Topic: How to remove transparency from a TIF and replace with white background
Replies: 23
Views: 623

Re: How to remove transparency from a TIF and replace with white background

JPG can't record transparency, so a JPG image is always fully opaque. The C program that I showed (flatcol.c) uses argv[3] as the colour: flatcol toes_holed.png flatcol_out.png Blue flatcol_out.png is: http://snibgo.com/imforums/flatcol_out.png Hacking flat.cpp to use a third parameter: #include <me...