Slashdot Mirror


Rotating JPG Images Without Losing Data?

Another voiciferous Anonymous Coward asks: "Is there a such thing as a loss-less JPEG rotator? I want to rotate 90 degrees w/o the decompress recompress cycle which chews up jpegs. Supposedly there are some for windows, but I haven't found any for Linux. The GIMP opens and resaves and from what I can tell so does ImageMagik."

14 comments

  1. Compupic by v4mpyr · · Score: 2

    Compupic over at photodex.com is a great program which does this and so much more. There's a free Linux version that works great . . . the only drawback is that after so many days the GIF and TIFF "license" expires. At that point you just delete your ~/.compupic/ directory and restart. ;-)

    --

  2. jpegtran by Daffy+Duck · · Score: 3
    The Independent JPEG Group's standard tool package includes "jpegtran" which will do exactly what you want. In fact, depending on your distribution, it might already be sitting on your Linux box.

    If not, here's one of many links that came up on Google.

  3. Tryy "jpegtran", distributed with libjpeg. by Anonymous Coward · · Score: 1
    It does various rotates, flips, conversions to progressive, etc., all directly on the compressed form, so there's no quality change. (Um, the picture has to be a multiple of 8 pixels on a side for perfect invertibility.)

    Written by the Independent JPEG Group.

  4. Oops, look before you link by Daffy+Duck · · Score: 4

    Sorry, the link above is for an old version of the software that doesn't do rotation. Here is a link to a more recent version.

  5. Corel Photopaint by Forager · · Score: 1
    IANALU, but I use Corel Photopaint 8 for my Windows PC, and that doesn't have any perceptible loss. I only mention this because I'm pretty sure it's available for Linux, since Corel makes it. Good software, I HIGHLY reccommend it. (Also, IMHO, while it might cost as much as Adobe Photoshop, it's ten times better because of one reason: its interface.)

    -Forager.

    --
    student of animation and the fine arts
    1. Re:Corel Photopaint by Sakke · · Score: 1

      photopaint for linux just sucked. it managed to crash my system few times, occasionally crashed only my X, and took amazing amount of harddrive space. it just sucks. btw, i suspect it was just a wine port, since there was huge amount of winelib rpm's that had to be installed. if they would've thinked twice what they were going to do, they would have done it properly. somebody might even use it if it worked.

      --
      ound the message used repetitively over and over still nothing grows silen
    2. Re:Corel Photopaint by RomulusNR · · Score: 1

      I use Corel Photopaint 8 for my Windows PC, and that doesn't have any perceptible loss.

      Sure, for high quality JPEG, if you have to decompress and recompress, you wont see a noticeable loss, no matter what S/W you use.

      But for a low quality JPEG, you'll have to recompress at a high quality rate in order to maintain the picture quality of the original with moderate safety.

      If you have a low quality JPEG, which you want to rotate, and then maintain as a low quality JPEG, you're doomed.

      Of course, this is all assuming your software will automatically re-compress on save, which is why the original question...

      --

      --
      Terrorists can attack freedom, but only Congress can destroy it.
  6. Hey, Cliff... by srcosmo · · Score: 1
    You forgot a " there, dude. What I think you meant was..

    ... haven't found any for Linux. The GIMP opens and resaves and from what I can tell so does ImageMagik

    Remember kids, use that preview button.

    --
    free speach
    Did you mean: free speech
  7. you'll have to decompress the huffman encoding by jab · · Score: 1

    Huh? To rotate a JPEG, you will have to decompress the huffman codes, swap the DCT coefficients and possibly do a sign change, swap corresponding quantization values then re-apply huffman compression. Sure it's lossless, but that's hardlly "rotating while compressed" A better phrase is "rotating without using inverse discrete cosine transforms." And this only works for 90 degree rotations! Besides, why sweat JPEG when JPEG 2000 is around the corner.

    1. Re:you'll have to decompress the huffman encoding by Anonymous Coward · · Score: 1

      Could it be because the source material that he has is in JPEG format, and converting formats (such as to an uncompressed bitmap and back to JPEG) incurs loss? JPEG 2000 is dragging its feet while the work he needs to do is here and now.

  8. Here are a few. by blameless · · Score: 1
    --

    Browser? I barely know her!
  9. Re:DUH!!! by ReelOddeeo · · Score: 1

    Pick up your monitor, and rotate it exactly 90 degrees, how easy is that?

    I hope you remembered to file a patent application prior to posting this idea.

    --

    Those who would give up liberty in exchange for security and DRM should switch to Microsoft Palladium!
  10. Re:DUH!!! by Duke+of+Org · · Score: 1

    How is this Redundant? Who else said this before me? BEsides, it was just a joke

  11. Re:there are programs that do this by OmegaDan · · Score: 1

    Amazing how many people would rather "ask slashdot" then just ask jeeves :) ...