Search found 8 matches

by Fry-kun
2019-12-05T11:54:37-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

Found it:

Code: Select all

-print '%wx%h %O'
(gets me the cropped size & offset)
by Fry-kun
2019-12-05T11:45:53-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

How do I extract +100+94 from the earlier result?

If I use that as

Code: Select all

composite -compose Dst_Over -geometry +100+94 bg.png frame.png  res.png
then I get exactly what I need

P.S. +repage gets rid of this info (at least in output of -identify), so I probably don't want to do that
by Fry-kun
2019-12-04T19:04:41-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

If I pass -identify, I see

Code: Select all

frame.png PNG 640x480=>451x291 642x482+100+94 8-bit sRGB 15718B 0.010u 0:00.000
is +100+94 what I want?
by Fry-kun
2019-12-04T19:00:45-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

I came up with an option that seems to work: convert frame.png -alpha extract # extract alpha channel -bordercolor black -border 1 # add black 1px border (in case frame touches the edges) -fuzz 99% -fill white -draw "color 0,0 floodfill" # flood fill the border transparency to make it opaque (fuzz t...
by Fry-kun
2019-12-03T12:48:32-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

This was very helpful, thank you! I tried to do this on the alpha mask of the frame (8-bit Gray 256c), but it doesn't trim all of the background for some reason. convert frame.png -alpha extract frame_mask.png https://i.ibb.co/FK7YZMx/frame-mask.png convert frame_mask.png -fuzz 99% -define trim:perc...
by Fry-kun
2019-12-02T23:52:51-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

If it helps, the inner image can be stretched all the way to the edges, but shouldn't be visible past the frame's outer transparency
by Fry-kun
2019-12-02T19:10:17-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Re: Insert SVG into a non-trivial frame?

Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org Platform: linux Frame: https://i.ibb.co/7GLxVF9/frame.png (note the gradual transparency around the outer edges & not straight lines along the inner edges) background image: https://i.ibb.co/715649b/background.png Wanted resu...
by Fry-kun
2019-12-02T17:42:51-07:00
Forum: Users
Topic: Insert SVG into a non-trivial frame?
Replies: 12
Views: 3910

Insert SVG into a non-trivial frame?

I have some frames (as in "picture frame") with transparency inside & out and a generic SVG, I would like to insert the SVG as a photo into the frames. The problem is that the frames are not consistent size & shape (inner transparency of the frame is mostly a rectangle, but can have other embellishm...