Search found 16 matches

by gringo974
2017-03-23T08:25:13-07:00
Forum: Developers
Topic: Static linking memory leaks
Replies: 1
Views: 6733

Static linking memory leaks

my IM build is 7.0.5-3, multi-threaded DLL (MTD) static lib. my OS is windows 8.1 my IDE is MS visual studio 2015. I noticed some memory leaks on my program that uses Magick++ api, when I tried to link statically. I use _CrtDumpMemoryLeaks to report memory leaks. I managed to reproduce it on the UTI...
by gringo974
2017-03-13T01:36:50-07:00
Forum: Bugs
Topic: svg loading ignores -density
Replies: 17
Views: 10027

Re: svg loading ignores -density

Hello,

I'm not sure if this is the same issue but I reported a svg size bug on the version ImageMagick-7.0.3.

Here is my report:
https://www.imagemagick.org/discourse-s ... =3&t=30591


The issue has been fixed in version ImageMagick-7.0.4.
by gringo974
2016-11-30T01:54:29-07:00
Forum: Developers
Topic: change image color in svg format and save to png or jpg
Replies: 29
Views: 24586

Re: change image color in svg format and save to png or jpg

Hello Mahir, With this code your svg xml elements contain 2 fill attributes like this: (In your browser, use Right Click -> View source to visualize xml) ... <text fill="aqua" transform="matrix(1 0 0 1 462.667 307.6924)" fill="#FF2A2A" font-family="'ArialMT'" font-size="100">blood</text> ... And lib...
by gringo974
2016-11-23T09:43:40-07:00
Forum: Developers
Topic: change image color in svg format and save to png or jpg
Replies: 29
Views: 24586

Re: change image color in svg format and save to png or jpg

oh yes this is a known librsvg issue:
Styles are ignored in librsvg. Adding type="text/css" to the style element fixes it
Just update your svg file like this and it works!

Code: Select all

...
<style type="text/css">.cls-1{fill:red;}.cls-1,.cls-2,.cls-3{stroke:#fff;stroke-miterlimit:10;}.cls-3{fill:#207ab2;}
...
by gringo974
2016-11-23T07:48:09-07:00
Forum: Developers
Topic: change image color in svg format and save to png or jpg
Replies: 29
Views: 24586

Re: change image color in svg format and save to png or jpg

The echo command should display the SVG text stream (something like "<svg>...</svg>") somewhere in a log file or in the browser where you call the php file. Please try this echo line and locate where this debug text is displayed. echo "DEBUG: MY UPDATED SVG TEXT = ".$svg; Without that, you can't deb...
by gringo974
2016-11-23T05:16:15-07:00
Forum: Developers
Topic: change image color in svg format and save to png or jpg
Replies: 29
Views: 24586

Re: change image color in svg format and save to png or jpg

Just display the svg (echo $svg) after the preg_replace to analyse it.
by gringo974
2016-11-23T02:05:42-07:00
Forum: Developers
Topic: change image color in svg format and save to png or jpg
Replies: 29
Views: 24586

Re: change image color in svg format and save to png or jpg

Your preg_replace is looking for the pattern: class="cls-1" style="fill:# which doesn't appear in your svg stream because the style is defined into the class. So if you want to change the cls-3 fill, your preg_replace should be: $svg = preg_replace( '/.cls-3{fill:#([0-9a-f]{6})/' ,'/.cls-3{fill::red...
by gringo974
2016-11-08T07:00:55-07:00
Forum: Developers
Topic: Caught exception: no decode delegate for this image format `' @ error/blob
Replies: 1
Views: 6180

Re: Caught exception: no decode delegate for this image format `' @ error/blob

Try to set the file format before calling readImageBlob.

Code: Select all

$image->magick("SVG");
by gringo974
2016-11-04T08:40:02-07:00
Forum: Bugs
Topic: convert svg weird result image
Replies: 6
Views: 5917

Re: convert svg weird result image

After having a look on the rsvg bug reports, this is a known bug:
Styles are ignored in librsvg. Adding type="text/css" to the style element fixes it
Your converted file looks much better after adding this (<style type="text/css">).
by gringo974
2016-11-04T08:17:29-07:00
Forum: Bugs
Topic: convert svg weird result image
Replies: 6
Views: 5917

Re: convert svg weird result image

Hi there! First, it seems the RSVG lib (2.40.15 for me) fails to handle the <style> tag. If you remove the <style> in your logo.svg file, Chrome renders it as the IM convert (full black). Here is a unit test for <style> tag: <svg width="80" height="80" xmlns="http://www.w3.org/2000/svg" xmlns:xlink=...
by gringo974
2016-10-11T07:01:03-07:00
Forum: Users
Topic: Rasterize svg text fonts
Replies: 0
Views: 6372

Rasterize svg text fonts

Hello, I would like to rasterize svg that contain text, but the used font file is not on the disk. I loaded the font into memory with the FreeType lib (FT_New_Memory_Face) and I would like to insert this FT font into the pangocairo font map. Is it possible to do it or the lib only uses the font syst...
by gringo974
2016-10-07T07:30:02-07:00
Forum: Bugs
Topic: SVG convert size issue
Replies: 8
Views: 6895

Re: SVG convert size issue

Everything is now resolved for me.
Thank you very much for your support :)
by gringo974
2016-10-06T07:59:13-07:00
Forum: Bugs
Topic: SVG convert size issue
Replies: 8
Views: 6895

Re: SVG convert size issue

Did you see the cropped image issue on magick convert for pixel.svg file (300-dpi)? If you don't want to investigate this issue, please revert your patch for metric units, I'd rather the previous behavior before my report (Most of the svg files didn't use metric units.). Your yesterday's commit on ...
by gringo974
2016-10-05T08:23:20-07:00
Forum: Bugs
Topic: SVG convert size issue
Replies: 8
Views: 6895

Re: SVG convert size issue

Indeed, this is weird... But before your patch, the IM convert did the job: $ convert --version Version: ImageMagick 7.0.3-0 Q8 x64 2016-09-05 http://www.imagemagick.org $ convert -density 300 metric.svg out.png $ identify out.png out.png PNG 393x393 393x393+0+0 8-bit sRGB 2c 400B 0.000u 0:00.000 $ ...
by gringo974
2016-10-05T06:54:21-07:00
Forum: Bugs
Topic: SVG convert size issue
Replies: 8
Views: 6895

Re: SVG convert size issue

I just tested your fix and it works fine for SVG that uses metric system units (mm, cm, in) BUT it doesn't work anymore for SVG that uses pixel units :(! You can reproduce the issue with this SVG: <?xml version="1.0" encoding="utf-8"?> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlin...