Strokewidth in caption (6.5.2-3)

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.
Post Reply
jorlando

Strokewidth in caption (6.5.2-3)

Post by jorlando »

In 6.5.2-3, when using caption, the -strokewidth n setting only turns stroke on or off. No matter what value is used, the stroke width stays the same. I see this was a problem back at 6.3.n. Has the problem returned?

Here is a sample command line:

Code: Select all

 -size 640x480 -background \#ffffff -strokewidth 12 -stroke \#ff0000 -fill \#ccffff -font /FatFonts/Vitamin.ttf -pointsize 50 -gravity northwest caption:"Font Image Generator" +repage -trim -bordercolor \#ffffff -quality 80 -border 0
Thx
Jeff
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Strokewidth in caption (6.5.2-3)

Post by magick »

We're using ImageMagick 6.5.2-10. We adding a debug statement in the caption module and it reports the same stroke width as specified on the command line (e.g. -strokewidth 12 returns 12.0 as expected for stroke width). We're not sure why its failing for you.
jorlando

Re: Strokewidth in caption (6.5.2-3)

Post by jorlando »

OK, Thanks. I'll go work on it some more and see if I can figure out whats going on. Will post back here later.

Jeff
jorlando

Re: Strokewidth in caption (6.5.2-3)

Post by jorlando »

Went back and checked scripting, everything looks OK except problem persists where -strokewidth setting controls only on or off at the lowest value.

Code: Select all

-size 640x480 -background \#ffffff -strokewidth 25 -stroke \#ff0000 -fill \#ccffff -font /fonts/SansSerif/Fourteen.ttf -pointsize 28 -gravity northwest caption:"-strokewidth 25" +repage -trim -bordercolor \#ffffff -quality 80 -border 0
yields this image
Image

The same command line with strokewidth set to one yields the same image
Image
We're using ImageMagick 6.5.2-10. We adding a debug statement in the caption module and it reports the same stroke width as specified on the command line (e.g. -strokewidth 12 returns 12.0 as expected for stroke width).
Does the actual image reflect the stroke setting?

Thx
Jeff
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Strokewidth in caption (6.5.2-3)

Post by magick »

Does the actual image reflect the stroke setting?
Yes and we used your command line settings.
jorlando

Re: Strokewidth in caption (6.5.2-3)

Post by jorlando »

Interesting observation ... when using annotate instead of caption, -strokewidth works as expected. Also, caption does not resize text to fill an area defined by both width and height and absent pointsize.

Is it possible that IM was not properly installed? Everything works fine otherwise
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Strokewidth in caption (6.5.2-3)

Post by anthony »

caption stroke width also works fine for me!!!

Code: Select all

convert -size 640x320 -gravity center -font Candice -pointsize 48 \
             -fill white -stroke black -strokewidth 1 caption:Anthony \
             -trim show:

Code: Select all

convert -size 640x320 -gravity center -font Candice -pointsize 48 \
             -fill white -stroke black -strokewidth 10 caption:Anthony \
             -trim show:
By the way -strokewidth does not 'turn on' stroke. setting the -stroke color to something other than 'none' will 'turn it on'.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
jorlando

Re: Strokewidth in caption (6.5.2-3)

Post by jorlando »

I noticed some additional issues, among them, -distort doesn't work and -caption absent -pointsize fails to fill, and none of Fred's scripts would run.

So I got a completely new Linux VPS account that was absolutely bare, installed the delegate libraries (libjpeg, libpng, zlib, freetype, and ghostscript) and then ImageMagick 6.5.3-2

Everything works perfectly.

When I run identify -list configure on the misbehaving installation, the CONFIGURE list shows that the delegates are present but are not listed by name as DELEGATES.
In the working installation, they are listed in both places.

Could this explain the weird behavior that I've described? Also, is there a way to repair this without a complete new install on my public server?

Thx
Jeff

  • /$ identify -list configure
    Path: /usr/local/lib/ImageMagick-6.5.2/config/configure.xml
    Name Value
    -------------------------------------------------------------------------------
    CC gcc -std=gnu99
    CFLAGS -fopenmp -g -O2 -Wall -W -pthread
    CONFIGURE ./configure '--with-bzlib=yes' '--with-djvu=yes' '--with-fpx=yes' '--with-freetype=yes' '--with-gvc=yes' '--with-jbig=yes' '--with-jpeg=yes' '--with-jp2=yes' '--with-lcms=yes' '--with-perl=yes' '--with-png=yes' '--with-wmf=yes'
    COPYRIGHT Copyright (C) 1999-2009 ImageMagick Studio LLC
    CPPFLAGS -I/usr/local/include/ImageMagick
    CXX g++
    CXXFLAGS -pthread
    DEFS -DHAVE_CONFIG_H
    DELEGATES
    DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-fontconfig=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-xml=no
    EXEC-PREFIX /usr/local
    HOST i686-pc-linux-gnu
    LDFLAGS -L/usr/local/lib
    LIB_VERSION 0x652
    LIB_VERSION_NUMBER 6,5,2,3
    LIBS -lMagickCore -lm -lgomp -lpthread
    NAME ImageMagick
    PCFLAGS -fopenmp
    PREFIX /usr/local
    QuantumDepth 16
    RELEASE_DATE 2009-05-09
    VERSION 6.5.2
    WEBSITE http://www.imagemagick.org
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Strokewidth in caption (6.5.2-3)

Post by magick »

On your public server, pay attention to the output of the configure script. It determines which delegates are validated and summarizes the results at the end of the script. Also check for permission problems. Add -debug configure,module to your command line to ensure ImageMagick can find its configuration files (e.g. delegates.xml) and modules (e.g. jpeg.so).
Post Reply