Search found 9482 matches

by snibgo
2017-12-15T11:53:51-07:00
Forum: Users
Topic: Reading file attributes quickly
Replies: 1
Views: 23

Re: Reading file attributes quickly

Perhaps exiftool does what you need.
by snibgo
2017-12-15T10:27:01-07:00
Forum: Users
Topic: Change canvas size and fit original image inside it, preserving aspect ratio.
Replies: 8
Views: 686

Re: Change canvas size and fit original image inside it, preserving aspect ratio.

First, I suggest you don't use "magick mogrify" or "magick convert". Just use "magick". This needs the input file, then do the processing, then write the output. Secondly, when you read the SVG, it is rasterised (converted to pixels) at whatever density you have specified, if any. If you then enlarg...
by snibgo
2017-12-15T08:57:18-07:00
Forum: Users
Topic: Change canvas size and fit original image inside it, preserving aspect ratio.
Replies: 8
Views: 686

Re: Change canvas size and fit original image inside it, preserving aspect ratio.

Do the same thing, but with the name of your SVG file.

If you want a better answer, you need to provide more details.
by snibgo
2017-12-15T05:32:53-07:00
Forum: MagickWand
Topic: MagickSetImageCompression not working
Replies: 1
Views: 24

Re: MagickSetImageCompression not working

If you are using v7, I'm surprised that program compiles. "wand" is a v6 directory. The v7 directory is "MagickWand". In my (admittedly old) v7.0.1-0 IM, there is no "magick_wand.h". And there are other problems. Building your program as v6, it builds and runs, and exiftool reports the output is not...
by snibgo
2017-12-15T05:08:48-07:00
Forum: Users
Topic: How to change logo color
Replies: 7
Views: 194

Re: How to change logo color

I guess, because your logo colour is within 15% of #c03030.
by snibgo
2017-12-14T15:17:04-07:00
Forum: Magick.NET
Topic: EXIF data lost on save
Replies: 5
Views: 131

Re: EXIF data lost on save

Exiftool is open source (see http://owl.phy.queensu.ca/~phil/exiftool/ ). Perhaps you can hack what you need from that.
by snibgo
2017-12-14T06:31:04-07:00
Forum: Users
Topic: How to change logo color
Replies: 7
Views: 194

Re: How to change logo color

Documentation of the options is at http://www.imagemagick.org/script/command-line-options.php "-opaque {colour}" means "change pixels that are currently {colour} to the fill colour". If fuzz was zero, only pixels that were exactly {colour} would be changed. With a fuzz of 15%, all colours that were ...
by snibgo
2017-12-13T11:14:35-07:00
Forum: Magick.NET
Topic: Force Density Units on Read?
Replies: 1
Views: 70

Re: Force Density Units on Read?

I believe the PNG standard allows for integer numbers, "units unknown" and "per metre" only. So it doesn't record density as "per inches". See http://www.w3.org/TR/2003/REC-PNG-20031110/#11pHYs EDIT: I'll add that, at the command line, we can change the units to get what we want after the read, eg: ...
by snibgo
2017-12-13T07:51:24-07:00
Forum: Users
Topic: Extracting image orientation from a JPEG
Replies: 2
Views: 95

Re: Extracting image orientation from a JPEG

In Windows BAT files, percent % has a special meaning. When you don't want that special meaning, you need to double it:

Code: Select all

magick identify -format "%%i:%%W:%%H\r\n" *.jpg >> image_list
by snibgo
2017-12-12T11:10:01-07:00
Forum: Users
Topic: Smoothly denoise an image of a scanned page
Replies: 7
Views: 157

Re: Smoothly denoise an image of a scanned page

Noise is like weeds in a garden -- weeds are simply plants we don't want. My point was to define what I was going to remove from the image, and it works because we want a "flat" (EDIT: I mean, "smooth", where the second derivative is mostly zero) background, but other definitions of "noise" are poss...
by snibgo
2017-12-12T09:53:09-07:00
Forum: Users
Topic: Smoothly denoise an image of a scanned page
Replies: 7
Views: 157

Re: Smoothly denoise an image of a scanned page

That "denoise.jpg" result contains lots of noise. If we define "noise" as slopes less than 10%, we can remove noise by finding the slope, zeroing values within 10% of zero, then reconstructing by finding the div and Poisson-pasting. http://snibgo.com/imforums/fragment_out2.jpg http://snibgo.com/imfo...
by snibgo
2017-12-11T20:04:59-07:00
Forum: Bugs
Topic: resize was successful but cannot decrease file size
Replies: 2
Views: 104

Re: resize was successful but cannot decrease file size

"-resize" changes the number of pixels in the image. It isn't designed to change the file size.

Most of the data in the input file is non-image data. If you "-strip" it, the size is 11,285 bytes.
by snibgo
2017-12-11T01:24:52-07:00
Forum: Developers
Topic: Convert PSD files with alpha channel to transparent background
Replies: 11
Views: 310

Re: Convert PSD files with alpha channel to transparent background

Windows BAT syntax for slope magnitude and threshold:

Code: Select all

convert 44-2868_10.psd[1] -profile sRGB.icc -strip x1.png

call %PICTBAT%slopeMag x1.png

%IM%convert ^
  x1_sm.png ^
  -threshold 1%% ^
  t.png
For slopeMag.bat, see Details, details.
by snibgo
2017-12-10T23:32:56-07:00
Forum: Developers
Topic: Convert PSD files with alpha channel to transparent background
Replies: 11
Views: 310

Re: Convert PSD files with alpha channel to transparent background

Okay, so you get single images from users, and want to remove backgrounds in general. That is possible if there is some way to distinguish background from foreground. In your "gray background" image, the foreground and background almost merge together towards the top-left. Separation is possible (fi...
by snibgo
2017-12-10T22:45:02-07:00
Forum: Developers
Topic: Convert PSD files with alpha channel to transparent background
Replies: 11
Views: 310

Re: Convert PSD files with alpha channel to transparent background

Each PSD file contains two images. The second is identical to the first. (At least, the two images that IM gets from the file are identical). All four images (two from each file) have an alpha channel, but it is fully opaque. The command I showed need two images with identical foreground but differe...