MMBase

Imageconvert: contrast and negate don't work properly

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5
  • Fix Version/s: 1.6.2
  • Component/s: Resources
  • Description:
    Hide
    original bugid: #200
    img.db convert options like contrast and negate don't work correctly, and will render a broken image.
    This is a syntax problem, that needs to be solved.

    For example
    http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
    This image will return a broken image because the contrast value has a '+' character in the value.
    This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
    But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

    A fix is needed for these type of convert options, anyone??
    In fact the sumitter of this bug did not read the imagemagic man-page right:

    -contrast
                  enhance or reduce the image contrast
                  
                  This option enhances the intensity differences between the lighter and darker elements of the
                  image. Use -contrast to enhance the image or +contrast to reduce the image contrast.
                  
                  
                  For a more pronounced effect you can repeat the option:
           
                      convert rose: -contrast -contrast rose_c2.png


    In other words. The imagemagic contrast option cannot have an argument.

    But the general point is valid (that the parsing of the template is too stupid). I have a fix for that.


    Furthermore I will make it possible to specifiy "+contrast" which will then generate the imagemagick's option "+contrast" rather then -constrast. (So 's(100)+"+contrast"' should now work
    Show
    original bugid: #200 img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone?? In fact the sumitter of this bug did not read the imagemagic man-page right: -contrast               enhance or reduce the image contrast                              This option enhances the intensity differences between the lighter and darker elements of the               image. Use -contrast to enhance the image or +contrast to reduce the image contrast.                                             For a more pronounced effect you can repeat the option:                           convert rose: -contrast -contrast rose_c2.png In other words. The imagemagic contrast option cannot have an argument. But the general point is valid (that the parsing of the template is too stupid). I have a fix for that. Furthermore I will make it possible to specifiy "+contrast" which will then generate the imagemagick's option "+contrast" rather then -constrast. (So 's(100)+"+contrast"' should now work

Activity

Hide
Pierre van Rooden added a comment - 1970-01-01 00:59
 I had the parameters wrong for contract and negate (hmmm, maybe older version of convert?).
The parameter problem DOES occur for:
-chop
-crop
-frame
-geometry
-page
-region
-resize
-roll
-size
Though I think in most cases the '+' may be optional.
Show
Pierre van Rooden added a comment - 1970-01-01 00:59  I had the parameters wrong for contract and negate (hmmm, maybe older version of convert?). The parameter problem DOES occur for: -chop -crop -frame -geometry -page -region -resize -roll -size Though I think in most cases the '+' may be optional.
Hide
Pierre van Rooden added a comment - 2002-05-15 18:04
Imageconvert: contrast and negate don't work properly
img.db convert options like contrast and negate don't work correctly, and will render a broken image.
This is a syntax problem, that needs to be solved.

For example
http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
This image will return a broken image because the contrast value has a '+' character in the value.
This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

A fix is needed for these type of convert options, anyone??
Show
Pierre van Rooden added a comment - 2002-05-15 18:04 Imageconvert: contrast and negate don't work properly img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone??
Hide
Daniel Ockeloen added a comment - 2002-08-12 19:58
Imageconvert: contrast and negate don't work properly
img.db convert options like contrast and negate don't work correctly, and will render a broken image.
This is a syntax problem, that needs to be solved.

For example
http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
This image will return a broken image because the contrast value has a '+' character in the value.
This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

A fix is needed for these type of convert options, anyone??
Show
Daniel Ockeloen added a comment - 2002-08-12 19:58 Imageconvert: contrast and negate don't work properly img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone??
Hide
Michiel Meeuwissen added a comment - 2003-03-07 20:35
Imageconvert: contrast and negate don't work properly
img.db convert options like contrast and negate don't work correctly, and will render a broken image.
This is a syntax problem, that needs to be solved.

For example
http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
This image will return a broken image because the contrast value has a '+' character in the value.
This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

A fix is needed for these type of convert options, anyone??
Show
Michiel Meeuwissen added a comment - 2003-03-07 20:35 Imageconvert: contrast and negate don't work properly img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone??
Hide
Michiel Meeuwissen added a comment - 2003-03-07 21:04
Imageconvert: contrast and negate don't work properly
img.db convert options like contrast and negate don't work correctly, and will render a broken image.
This is a syntax problem, that needs to be solved.

For example
http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
This image will return a broken image because the contrast value has a '+' character in the value.
This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

A fix is needed for these type of convert options, anyone??
In fact the sumitter of this bug did not read the imagemagic man-page right:

-contrast
              enhance or reduce the image contrast
              
              This option enhances the intensity differences between the lighter and darker elements of the
              image. Use -contrast to enhance the image or +contrast to reduce the image contrast.
              
              
              For a more pronounced effect you can repeat the option:
       
                  convert rose: -contrast -contrast rose_c2.png


In other words. The imagemagic contrast option cannot have an argument.

But the general point is valid (that the parsing of the template is too stupid). I have a fix for that.


Furthermore I will make it possible to specifiy +contrast(+) which will then generate the imagemagick's option "+contrast" rather then -constrast.
Show
Michiel Meeuwissen added a comment - 2003-03-07 21:04 Imageconvert: contrast and negate don't work properly img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone?? In fact the sumitter of this bug did not read the imagemagic man-page right: -contrast               enhance or reduce the image contrast                              This option enhances the intensity differences between the lighter and darker elements of the               image. Use -contrast to enhance the image or +contrast to reduce the image contrast.                                             For a more pronounced effect you can repeat the option:                           convert rose: -contrast -contrast rose_c2.png In other words. The imagemagic contrast option cannot have an argument. But the general point is valid (that the parsing of the template is too stupid). I have a fix for that. Furthermore I will make it possible to specifiy +contrast(+) which will then generate the imagemagick's option "+contrast" rather then -constrast.
Hide
Michiel Meeuwissen added a comment - 2003-03-13 14:35
Imageconvert: contrast and negate don't work properly
img.db convert options like contrast and negate don't work correctly, and will render a broken image.
This is a syntax problem, that needs to be solved.

For example
http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50)
This image will return a broken image because the contrast value has a '+' character in the value.
This is since the generic mmbase images code assumes that after every '+' character a new option is specified.
But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' .

A fix is needed for these type of convert options, anyone??
In fact the sumitter of this bug did not read the imagemagic man-page right:

-contrast
              enhance or reduce the image contrast
              
              This option enhances the intensity differences between the lighter and darker elements of the
              image. Use -contrast to enhance the image or +contrast to reduce the image contrast.
              
              
              For a more pronounced effect you can repeat the option:
       
                  convert rose: -contrast -contrast rose_c2.png


In other words. The imagemagic contrast option cannot have an argument.

But the general point is valid (that the parsing of the template is too stupid). I have a fix for that.


Furthermore I will make it possible to specifiy "+contrast" which will then generate the imagemagick's option "+contrast" rather then -constrast. (So 's(100)+"+contrast"' should now work
Show
Michiel Meeuwissen added a comment - 2003-03-13 14:35 Imageconvert: contrast and negate don't work properly img.db convert options like contrast and negate don't work correctly, and will render a broken image. This is a syntax problem, that needs to be solved. For example http://images.vpro.nl/img.db?5384074+s(90)+modulate(0,-100,0)+contrast(+50) This image will return a broken image because the contrast value has a '+' character in the value. This is since the generic mmbase images code assumes that after every '+' character a new option is specified. But because contrast has a + in the value it gets an illegal option 'contrast(' and option '50)' . A fix is needed for these type of convert options, anyone?? In fact the sumitter of this bug did not read the imagemagic man-page right: -contrast               enhance or reduce the image contrast                              This option enhances the intensity differences between the lighter and darker elements of the               image. Use -contrast to enhance the image or +contrast to reduce the image contrast.                                             For a more pronounced effect you can repeat the option:                           convert rose: -contrast -contrast rose_c2.png In other words. The imagemagic contrast option cannot have an argument. But the general point is valid (that the parsing of the template is too stupid). I have a fix for that. Furthermore I will make it possible to specifiy "+contrast" which will then generate the imagemagick's option "+contrast" rather then -constrast. (So 's(100)+"+contrast"' should now work

People

Dates

  • Created:
    2003-03-13 14:35
    Updated:
    2006-11-29 10:56
    Resolved:
    2006-11-24 12:55