#196 +repage option not respected with convert command

closed-fixed
5
2012-05-24
2012-05-23
No

Built with imagemagick compatibility, the +repage option to convert does not work and throws the error "Option '+repage' requires an argument or argument is malformed.". This conflicts with expected behavior based upon GraphicsMagick documentation.

Discussion

  • Joel Knighton

    Joel Knighton - 2012-05-23

    It appears to be in the handling of options - it expects an appropriate geometry to follow.

    if (LocaleCompare("repage",option+1) == 0)
    {
    if ((*option == '-') || (*option == '+'))
    {
    i++;
    if ((i == argc) || !IsGeometry(argv[i]))
    ThrowConvertException(OptionError,MissingArgument,option);
    }

    In the actual MogrifyImage method, it appears the code is there to handle the argument correctly if an exception hadn't been raised earlier.

    if (LocaleCompare("repage",option+1) == 0)
    {
    if (*option == '+')
    {
    /* Reset page to defaults */
    (*image)->page.width=0U;
    (*image)->page.height=0U;
    (*image)->page.x=0;
    (*image)->page.y=0;
    }

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2012-05-24

    This issue is fixed by changeset 0645ba1a3c0a and the fix will be in the next release.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2012-05-24
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks