Seamless jpeg resize

  • Wesley Morgan

    Wesley Morgan - 2007-12-06

    Is it possible to use the transcoding to do automatic jpeg resizing? I tried this, but it didn't work at all:

      <transcoding enabled="yes">
            <transcode mimetype="image/jpeg" using="jpeg-resize"/>
          <profile name="jpeg-resize" enabled="yes" type="external">
            <agent command="/usr/local/bin/convert -geometry 1920x1080" arguments="%in %out"/>
            <buffer size="1048576" chunk-size="131072" fill-size="262144"/>

    However, I find that some of the options for the transcoding aren't very well documented and I'm not sure how they work. I don't even think the command is being called, as substituting a little shell script that echoes some debug output to a file showed nothing.

    • Jin

      Jin - 2007-12-06

      So far transcoding settings are only documented in the readme.lyx file in the doc directory.

      You almost had it right, you just put command and arguments together, try the following:
              <profile name="jpeg" enabled="yes" type="external">
                  <agent command="convert" arguments="-geometry 1920x1080 %in %out"/>
                  <buffer size="1048576" chunk-size="2072" fill-size="262144"/>

      Usually you would want to pass the resolution values to the renderer, this can be done with the <resolution> tag in the profile: i.e. <resolution>1920x1080</resolution>, howerver there is one problem: convert will scale the image proportionally, that means that the resulting image will not necessarily have the exact specified dimensions. I am not sure how to work around that; but one solution would be to not specify the resolution and hide the original resource (like in the example above)


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks