Stroke , Outline Errors and Debian Version 7

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Hello, after a lot of research on the web, i can't find any answer for my problem.
I'm using Debian V7.11( Wheezy) with ImageMagick latest version 6.7.7.10 for this Debian Release.
As indicated : https://packages.debian.org/wheezy/imagemagick
I've tried apt-get upgrade but the version seems to be the latest.

I've got bugs for stroke text and i've try so many differents scripts but it always failed :
Image
Image
i've posted a message here too :
https://stackoverflow.com/questions/521 ... nge-effect

It will be so great if the version was updated for Debian i don't want to change to Debian 8, it's too much work and i need it in one week to finish an illustration.

I found someone else that might have been the same kind of bugs : https://bugs.debian.org/cgi-bin/bugrepo ... bug=876482

Have you got a solution for this ?
Can i downgrade my version to a version that will work with outline ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

What was your exact command line?

What is the date of your ImageMagick 6.7.7.10 install. It will tell you when you do

Code: Select all

convert -version
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Hello,

Code: Select all

 convert -version : ImageMagick 6.7.7-10 2018-05-23 Q16 http://www.imagemagick.org
i've tried with convert

Code: Select all

$c1="#ffffff";
 $cmd="-size {$width}x{$height} xc:none -font $font -pointsize $fontsize -fill orange \
           -gravity northwest -stroke \"".$c1."\" -strokewidth 15 -annotate +0+0 '$text' \
           -stroke none                 -annotate +0+0 '$text' \
           $path";
exec(" convert $cmd ");
or with php

Code: Select all

$stroke_w=5;
$draw = new ImagickDraw();
$draw->setGravity(Imagick::GRAVITY_NORTHWEST);
$draw->setFont($font);
$draw->setStrokeColor("rgb(".$c4.",".$c5.",".$c6.")");  
$draw->setStrokeWidth($stroke_w);
$draw->setFillColor("rgb(".$c1.",".$c2.",".$c3.")");
$draw->setFontSize($font_size); 
$image_size = new Imagick(); 
$metrics = $image_size->queryFontMetrics($draw,$text); 
$width = $metrics['textWidth']+($stroke_w*2);
$height = $metrics['textHeight']+($stroke_w*2);
$strokeImage = new Imagick();
$strokeImage->newImage($width,$height,new ImagickPixel('#00000000'));
$strokeImage->annotateImage($draw, 0, 0, 0, $text);
$n0='image.png';
$strokeImage->writeImage($n0);
$draw->clear();
$draw->destroy();
$strokeImage->clear();
$strokeImage->destroy();
I've tried with another server configuration and it works, i think it's a version problem, because with the same code i can create outline.
I need to make it works with my Debian, it will be great, thanks for help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

Please supply your example command line with your variables filled out so it can be duplicated exactly. We need to know what font you use and what your argument values are.

If it works on one system and not another, I would check the versions of the delegate library freetype and fontconfig as well as the delegate for output image format that you are using
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Ok ,thanks for your quick answer :
The result for this simple test :
Image
The command line :

Code: Select all

convert -size 333.359375x89 xc:none -font src/Lobster.ttf -pointsize 61.57 -fill white \ -gravity northwest -stroke black -strokewidth 10 -annotate +0+0 ' new element ' \ -stroke none -annotate +0+0 ' new element ' \ temp/image.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

Using ImageMagick 6.9.10.11 Q16 Mac OSX with freetype @2.8.1_0, I get

Code: Select all

convert -size 333.359375x89 xc:none -font /Library/fonts/Lobster.ttf -pointsize 61.57 -fill white \
-gravity northwest -stroke black -strokewidth 10 -annotate +0+0 ' new element ' \
-stroke none -annotate +0+0 ' new element ' \
stroke_font_lobster.png
Image

I suggest you check your version of freetype and upgrade if not current.
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Hello thanks for your test .
My version is 6.7.7-10 maybe the bug was removed between this and your test version.
i think it's a bug with a dependencie with Debian (maybe) see the bug report of a user that have got the exact same problem "One
line is drawn from the end of the text back to the beginning." : https://bugs.debian.org/cgi-bin/bugrepo ... bug=876482

Imagettftext works on the Debian so i don't think that the problem come from Freetype (thanks anyway)
I've tried update : libfreetype6 is already the newest version.

My Imagemagick version is from 2012, i think there is a bug somewhere.
I've made test with Font without curve and all the text is perfectly written.

Can i add the latest version for latest Debian release ?
Is it the same process ? viewtopic.php?t=29006
No risk to lost Imagemagick functions ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

Linux distributions don't often change the release version when they patch ImageMagick. So the import factor is the date associated with the patch. Yours was patched last on 2018-05-23. So it is only a few releases old. However, patches may not include all changes. Some Linux distributions only patch for security. So it is really hard to tell what your issue might be. See https://www.freetype.org/download.html for the latest version of freetype. Be sure that both your systems have the same versions and preferably the latest version.

If that is the case, then your Linux distribution was not patched fully or properly, in my opinion. It is not an ImageMagick issue.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

Linux distributions don't often change the release version when they patch ImageMagick. So the import factor is the date associated with the patch. Yours was patched last on 2018-05-23. So it is only a few releases old. However, patches may not include all changes. Some Linux distributions only patch for security. So it is really hard to tell what your issue might be. See https://www.freetype.org/download.html for the latest version of freetype. Be sure that both your systems have the same versions and preferably the latest version.

If that is the case, then your Linux distribution was not patched fully or properly, in my opinion. It is not an ImageMagick issue.
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Hello, i've correctly updated Imagemagick here is my new convert -version :

Code: Select all

Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-09-06 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): bzlib djvu fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff wmf x xml zlib
I can use annotate with success but when i use stroke it's still the same error ..
I don't know what to do ? There seems to be a conflict (php ?) with a package but where ?
Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

This command works fine for me on IM 7.0.8.11 Q16 HDRI Mac OSX

Code: Select all

magick -size 333.359375x89 xc:none -font /Library/fonts/Lobster.ttf -pointsize 61.57 -fill white \
-gravity northwest -stroke black -strokewidth 10 -annotate +0+0 ' new element ' \
-stroke none -annotate +0+0 ' new element ' \
stroke_font_lobster.png
Image

Code: Select all

Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-08-30 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP 
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps raw rsvg tiff webp x xml zlib
Fredericks-Mac-mini:desktop fred$ 
Did you use magick or convert for your command?

Try disabling OpenMP?

Are you running the command via PHP exec() or directly in a terminal?
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

When i started to install new version only php command was working and convert was not so i needed php lib to make it work.
Then after the new install all was working normally.
I've tried magick : the command is not found .
I tried in my terminal convert and it was working but still the same error.
I've have not disabled OpenMP because i don't know how.
I'm still trying to fix error !! thanks again.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

If you installed Imgamagick 7 and do not have any other version still installed, then magick should work properly on the command line one in PHP exec(). Perhaps your Imagick needs IM 6 and not IM 7?
easy_easy
Posts: 11
Joined: 2018-09-03T13:28:27-07:00
Authentication code: 1152

Re: Stroke , Outline Errors and Debian Version 7

Post by easy_easy »

Thank you, i will make test.
is there a log file for ImageMagick's Error ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stroke , Outline Errors and Debian Version 7

Post by fmw42 »

There is a log file when installing from source. It is in the download folder called config.log
Post Reply