Search found 23 matches

by GlennIM
2018-09-01T22:44:59-07:00
Forum: Magick.NET
Topic: Best Way To Compress .PNG Image File?
Replies: 1
Views: 5570

Best Way To Compress .PNG Image File?

What is the best way to compress a .PNG format file that ImageMagicK creates to make the image file smaller in size?

ImageOptimizer optimizer = new ImageOptimizer();

optimizer.LosslessCompress(imageMod);

Or...

optimizer.Compress(imageMod);
by GlennIM
2018-08-25T12:02:43-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Re: Dynamically Set FontPointSize for Text?

Thank you SO much. I set the Width to the width of the image minus a little to give some padding and it works.

I'm curious, what does setting the Width actually do? Does it "scale" the text?

-Glenn
by GlennIM
2018-08-21T19:25:48-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Re: Dynamically Set FontPointSize for Text?

Here is the test image where you can see the text does not size properly inside the rounded corner image on the top and bottom. The code I wrote is below. http://spygearco.net/TestImage.png Yes. Here is the sample code below that produces the image above. Please tell me how I can resize the text wit...
by GlennIM
2018-08-19T11:39:14-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Re: Dynamically Set FontPointSize for Text?

I also tried this code and it returns the wrong font point size... static public int MeasureDisplayStringWidth(Graphics graphics, string text, Font font) { System.Drawing.StringFormat format = new System.Drawing.StringFormat(); System.Drawing.RectangleF rect = new System.Drawing.RectangleF(0, 0, 100...
by GlennIM
2018-08-19T08:17:33-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Re: Dynamically Set FontPointSize for Text?

I think each image will have a different resolution. Is there a way to force all the images I modify to be the same resolution?

If so can you tell me how I could change the GetProperFontSize(image) to calculate the proper FontPoinSize for the FontFamily used?
by GlennIM
2018-08-19T07:22:28-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Re: Dynamically Set FontPointSize for Text?

Not sure what you mean by resolution. I am using a .JPG file for image modification. Here is the code I use... int widthOfImage = GetProperFontSize(image); var headerSnippetreadSettings = new MagickReadSettings() { FontFamily = FontFamily, // i.e. "Helvetica-Condensed-Light" FontPointsize = widthOfI...
by GlennIM
2018-08-19T05:44:09-07:00
Forum: Magick.NET
Topic: Dynamically Set FontPointSize for Text?
Replies: 10
Views: 9604

Dynamically Set FontPointSize for Text?

Please help... I'm desperate. In my application I'm using a variety of Fonts by setting FontFamily variable, but I need the FontPointSize to change to fit into the dimensions of the image the text is written on. I tried calculating the FontPointSize using the code below but it doesn't really do the ...
by GlennIM
2018-07-22T23:13:49-07:00
Forum: Magick.NET
Topic: Bubble Button or Cut Off Corners ?
Replies: 0
Views: 7932

Bubble Button or Cut Off Corners ?

Does anyone know how to achieve this in C#/.NET from https://www.imagemagick.org/Usage/thumbnails Bubble Button convert thumbnail.gif -fill gray50 -colorize 100% \ -raise 8 -normalize -blur 0x8 bubble_overlay.png convert thumbnail.gif bubble_overlay.png \ -compose hardlight -composite bubble_button....