Retaining image rotation information (exif?) while resizing/scaling

I have written the following routine to resize/scale down JPG files:
BufferedImage src = ImageIO.read(source);
BufferedImage dest = new BufferedImage(destWidth,destHeight,
BufferedImage.TYPE_INT_RGB);
Graphics2D g = dest.createGraphics();
AffineTransform at = AffineTransform.getScaleInstance( (double)destWidth/src.getWidth(), (double)destHeight/src.getHeight());
g.drawRenderedImage(src,at);
ImageIO.write(dest,"JPG",targetFile);The code does it's job, but during the rezise process some information is lost, example: Photos that were taken vertically (camera rotated 90 degrees) appear as if they were taken horizontally, all EXIF information is also lost (perhaps rotation info is stored as exif?)
Question: How do I preserve this information during resizing?
Thanks :)
Edited by: GeirGP on Sep 11, 2009 5:13 PM

[This thread|http://forums.sun.com/thread.jspa?threadID=5398197&tstart=45] might be of interest to you.

Similar Messages

  • Problem with image rotation. Images are distorted.

    Here is the story:
    I import images. Some of the need to be rotated because the camera not always records rotation properly. So I rotate them in LR. Everything is fine so far. But when I want to edit the rotated file in PS (CS2) problems arise.
    Either LR does not send information about image rotation or PS does not recognize it. The image opens in PS as it was initially shot so in order to work on it properly I need to rotate it in PS again. When I return to LR the thumbnail looks fine but the develop module stretches or distorts the image.
    As far as I remember I dodn't have such a problem a week ago so what could be the cause?

    I am also having this problem, again using Jpegs. If I Right click in LR and choose "Edit Original" in Photoshop CS, the photo appears correctly oriented in PS. I edit it (in this case using PTLens to remove distortion and then cropping) and save the file.
    LR now displays it correctly in the Library module, but stretched in the Develop Module. The edges of the image and the grey pinstripe around it also flash grey a couple of times a second while displaying stretched.
    I tried reading metadata from file, and this deleted all my LR edits (not just ratings etc) to the file but didn't fix the problem.
    Any more ideas? This doesn't happen if I edit a copy of the original file, but don't really want to duplicate all images shot on a wide angle lens. Is this something in the way PS CS re-writes the orientation information to a jpeg, or how LR reads it?
    Sam

  • Image rotation working in template, but nowhere else

    Hi,
    I'm relatively new to Dreamweaver.
    I have a page with some rotating images, created following a Communitymx recommendation (http://www.communitymx.com/content/article.cfm?cid=651FF).
    The website template (http://www.johnaverill.com/templates/main_template.dwt) seems to rotate images perfectly; however, image rotation on index.html and the others will not work.
    Any help or recommendations would be greatly appreciated.  Thanks, Paul

    osgood_
    ah, you are correct.  sorry, I didn't catch that I was i am just posting the same old apparent bad code (index.html).
    I did create index_2.html and rename it to index.html per your instructions of Mar 5 (i've actually done it twice now). Pictures not rotating with the index_2 or the new index.html either.  
    Also noticed recreating the index continues to get me the extra:
    function randomImages(){
    if(counter == (imgs.length)){
    counter = 0;
    the template seems to be putting this in there new index for some reason.
    New index here:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main_template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>John Averill - Welcome</title>
    <!-- InstanceEndEditable -->
    <style type="text/css">
    <!--
    body {
    background: #000;
    margin: 0;
    padding: 0;
    color: #000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 100%;
    font-weight: normal;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
    h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;  /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    padding-right: 15px;
    padding-left: 15px;
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
    color: #000;
    text-decoration: none; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
    color: #000;
    text-decoration: none;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    text-decoration: underline;
    /* ~~ this fixed width container surrounds the other divs ~~ */
    .container {
    width: 960px;
    background: #FFF;
    margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
    background: #000;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
    font-size: 100%;
    /* ~~ The footer ~~ */
    .footer {
    padding: 10px 0;
    background: #FFF;
    margin: 20px;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #maincontent {
    width:915px;
    height:auto;
    z-index:1;
    left: 114px;
    top: 351px;
    margin: 20px auto 0px;
    .container .footer table tr td h6 {
    color: #FFF;
    </style>
    <script type="text/javascript">
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    /* pw - removed old code
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    // Comma separated list of images to rotate
    var imgs = new
    Array('_images/1.jpg','_images/2.jpg','_images/3.jpg','_images/4.jpg');
    // delay in milliseconds between image swaps 1000 = 1 second
    var delay = 3000;
    var counter = 0;
    function preloadImgs(){
       for(var i=0;i<imgs.length;i++){
         MM_preloadImages(imgs[i]);
    function randomImages(){
       if(counter == (imgs.length)){
         counter = 0;
       MM_swapImage('rotator', '', imgs[counter++]imgs[i]);
    function randomImages(){
       if(counter == (imgs.length)){
         counter = 0;
       MM_swapImage('rotator', '', imgs[counter++]);
       setTimeout('randomImages()', delay);
    </script>
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    </head>
    <body onload="preloadImgs();randomImages();">
    <div class="container">
      <div class="header">
        <div align="center"><!-- InstanceBeginEditable name="header_image" -->
    <img src="_images/1.jpg" name="rotator" width="960" height="300" id="rotator" /><!-- InstanceEndEditable -->
          <ul id="MenuBar1" class="MenuBarHorizontal">
            <li><a href="index.html">Home</a></li>
            <li><a href="about.html">About</a></li>
    <li><a href="partners.html">Our Underwriters</a></li>
      <li><a href="claims.html">Claims</a></li>
    <li><a href="markets.html">Industry Focus</a></li>
      <li><a href="assignments.html">Assignments</a></li>
      <li><a href="_clienttestimonials/testimonials.html">Client Testimonials</a></li>
      <li><a href="resources.html">Resources</a></li>
          </ul>
        </div>
        <!-- end .header -->
      </div>
      <div class="content">
    <h1> </h1>
    <!-- InstanceBeginEditable name="main_content" -->
    <div id="maincontent">
      <p><img src="_images/john_averill_bw.jpg" alt="" width="98" height="122" align="right" /></p>
      <p> </p>
      <h1><img src="_images/johncaverill.jpg" alt="" width="313" height="80" id="Image3" /></h1>
      <h3>Insurance  and Risk Management for Aircraft/Aerospace and Defense Companies</h3>
      <p align="justify">Welcome, this is an online bio for John C. Averill.  This site also has a description of my capabilities, services offered and successes</p>
      <p align="justify">FIDUCIARY ROLE</p>
      <p align="justify">My team and I take our  fiduciary role as insurance brokers and risk consultants seriously. I am held  accountable to a select group of risk management professionals who have an  enormous amount of wisdom and knowledge about the property and casualty insurance  world, providing my team and me consistent guiding principles. Due to our  fiduciary role, we do not publicize our clients list but we do have several letters  from clients on file as part of this site, see Client Testimonials.</p>
      <p align="justify">CONFIDENCE IN THE PROCESS</p>
      <p align="justify">The process of  designing a risk management strategy and purchasing insurance should be  comprehensive. The focus should be on pre-engineering claims payments. You should have  total confidence in your broker and insurance company. After a claim has  occurred is not the time to second guess the dollars you spent on insurance  premiums and the commissions or fees you paid a broker. </p>
      <p align="justify">PHILOSOPHY</p>
      <p align="justify">Our philosophy and  goal is to never have a client have an uncovered claim that he / she failed to insure. We have developed   processes and procedures to determine exposures, forecast claims and efficiently  purchase the needed insurance coverage.</p>
      <p align="justify"><strong>SERVICES OF AEROSPACE AND DEFENSE DIVISION</strong></p>
      <p>Insurance Brokerage</p>
      <p>Risk Analysis  (Internal Risk Resource Data Base)</p>
      <p>Travel Risk Management  analysis</p>
      <p>Global Travelers Group </p>
      <p>Submission Preparation</p>
      <p>Benchmarking Analysis</p>
      <p>Contractual Review</p>
      <p>Loss Control</p>
      <p>Direct Access to all  major insurance companies</p>
      <p>Internal claims  adjustors</p>
      <p>Quarterly Newsletter </p>
      <h1> </h1>
    </div>
    <!-- InstanceEndEditable -->
    <h1> </h1>
      </div>
      <div class="footer">
        <table border="0" align="center">
          <tr>
            <td width="906" height="5" bgcolor="#004C90"><h6>Aviation News</h6></td>
            <td width="906" height="5" bgcolor="#004C90"><h6>News on John</h6></td>
            <td width="906" height="5" bgcolor="#004C90"><h6>Quick Help</h6></td>
          </tr>
          <tr>
            <td width="906" height="25" valign="top"><h5 align="left">
              <script language="JavaScript" src="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fwww.aero-news.net%2Fnews%2Frssfeed.xml&am p;num=3&amp;utf=y"  charset="UTF-8" type="text/javascript"></script>
              <noscript>
              <a href="View" _mce_href="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fwww.aero-news.net%2Fnews%2Frs sfeed.xml&amp;num=3&amp;utf=y&amp;html=y">View">http://feed2js.org//feed2js.php?src=http%3 A%2F%2Fwww.aero-news.net%2Fnews%2Frssfeed.xml&amp;num=3&amp;utf=y&amp;html=y">View RSS feed</a>
              </noscript>
            </h5>
            <p align="left">  </p></td>
            <td width="906" height="25" valign="top"><h5>Averill speaks at 2011 Risk and Insurance Management  Society annual conference in Vancouver on Aviation Loss Control.  </h5>
            <h5>Averill appointed to National Business Aviation  Association Insurance Committee. </h5></td>
            <td width="906" height="25" valign="top"><!-- InstanceBeginEditable name="quick_help" -->
              <h5 align="left"><a href="claims.html">Claims Information</a></h5>
    <h5 align="left"><a href="contacts.html">Contact Me</a></h5>
            <!-- InstanceEndEditable --></td>
          </tr>
        </table>
        <p><img src="_images/ioa_aerospace_logo.jpg" width="150" height="70" alt="ioa_logo" /></p>
    </div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    <!-- InstanceEnd --></html>

  • Image Rotation with AE SDK

    Hello all,
       I am wondering if someone could suggest a desription of image rotation using Adobe AE SDK - in a Forum entry or in some other related document. While some elements of rotation may be considered available in SDK sample projects - Shifter for all pixels, CCU for individual pixels manipulation - I will appreciate more details for variable subpixel processing and neighbouring pixel interpolation for variable row-by-row shift. It is assumed the angle of rotation is fixed during the effect, and there are no worries about the appearance of out-of-border picture elements since there is a background. Speed will not be an issue as well.
       Thank you in advance.        

    well, the easiest way for rotating an image through the sdk is by using transform_word().
    it takes a matrix (or matrices for motion blur), so you can do any transform operation concievable via a matrix.
    here's a thread with some detail about this function:
    http://forums.adobe.com/message/1970939#1970939
    as for line by line transformations...
    there are some toos in the SDK, but they're available only for AEPGs of type "artizan" (the plug-ins that render whole comps),
    so if you're planning a layer effect, these tools are out of the question.
    you can do that calculation manually in a few ways.
    you can create a tranformation matrix and run each pixel through it, which would probably be the fastest most versitile way.
    or you can use trigonometry, which would probably be the easiest to implement but the slowest to process.
    using the sdk's subpixel sample functions would complete the tools you need, but keep in mind that this would be the slowest possible way of rotating an image.

  • How do I stop images in sequence from being resized by QT

    After editing photos and saving them to a file, I've opened them as an image sequence in QT only to find that some of the images have been resized to fit the QT window causing image distortion. I've looked for a setting in QT to maintain image ratio but no luck. Am I missing something? I've resized all of the images so that either the height or the width are the same. Why aren't the images being displayed in QT with a border if they don't fit the window rather than forcing the fit?

    An image sequence import must start with identically sized files or the import will be based on the first image dimensions.
    If your first image is 640X480 and the next image is 800X600 it will be scaled down to 640X480 at import. You also can't mix portrait and landscape images.
    You could use software like Graphic Converter to "batch" export your images to the same scale.
    Another method would be to use iPhoto (drag your folder of images to a new album). It can make nice slide show movies and it will "center" smaller images and scale others.

  • Image rotator problem on Dreamweaver site

    Hi I am running into a problem on my main index site. If you look at the image rotator on the very top of the page http://oldfortestates.com/index.htm via firefox (only that browser) you will see that there is a flashback of some of the images before it moves to the next image. I tried everything and can't figure it out. However if you look at the page http://oldfortestates.com/index_test.htm where I took out the info of the body of the page you will see that it is working fine and there is no flashback, however as soon as I include the information in the body the images once again do the same flashback. I need to find a way to have the full page without the flashback. Any assistance would be appreciated.

    I realized that it is the exfeat addon which is causing the problem below. Once it is on the page it interfers with the image rotator to the top. There must be a way for it to work without the interference.

  • Simple image rotation

    Hi all,
    Have a couple of pages on a site i'm building where i need a simple image rotation / image swap.
    It doesn't have to be anything flash, it's purely for a 200px square image to automatically swap every 5 seconds or so. It doesn't need any user buttons to go to next / previous, or enlarge when clicked.
    I've tried a couple of free jquery ones, but these won't load the starting image until all the images have been loaded into the browser, so you end up with a blank spot, then after say 10 seconds the images appear.
    Looking through the programs forums, it seems that the jquery i'm downloading isn't configurable to preload the images, so maybe i'm going down the wrong route completely!
    Whats the best / simplest way to do this and can you recommend anywhere to read up on how to implement it?
    Thanks
    Dan

    Dan, download the cycle plugin pack first: http://jquery.malsup.com/cycle/download.html. You can copy/ paste in a new .js file and store it locally on your site folder. Or, you could also use the cloud link as I've given below. Both will work.
    Then, include the jQuery library to before closing your </head> tag:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    Now, include the jQuery cycle plugin library before your </head> tag:
    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>
    Define the DIV that will animate with cycle plugin before your </head> tag:
    <script type="text/javascript">
    $(document).ready(function() {
        $('.slideshow').cycle({
    fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    </script>
    In the above code, Div with class slideshow will keep cycling with a fade effect. Note that for some effects to work, you may require the jquery easing plugin. But, fade will do just fine for your original question.
    Then, structure your image container:
    Based on your original code:
    <p class="pagetext">    <img src="images/hgsindeximg1.png" alt="School pupils" width="300" height="233" class="fltrt">Welcome  to our school website, we hope that you enjoy looking around the site. <br>
        </p>
    You have to restructure it this way:
    <p class="pagetext">
    <div class="slideshow">
    <img src="images/hgsindeximg1.png" alt="School pupils" width="300" height="233" class="fltrt">
    <img src="images/hgsindeximg2.png" alt="School pupils" width="300" height"233" class="fltrt">
    <img src="images/hgsindeximg3.png" alt="School pupils" width="300" height"233" class="fltrt">
    </div>
    Welcome  to our school website, we hope that you enjoy looking around the site. <br>
        </p>
    In the above code, I've added 2 more images that will rotate on your page. Change the filenames to whatever you desire. Also, ensure you retain the image dimensions same across all 3 images for best results.
    If you notice, I've just moved the images into a DIV called 'Slideshow'. As defined previously, all 3 images with <img..> within the div with class slideshow will keep rotating.
    On a sidenote, please please please please change the background color from red to something 'non-distractive'! Seriously, I went searching for moisturizing drops for my eyes once I opened up the test page you had posted!
    Trust this helps.

  • Fast image rotation and contrast adaptation

    First: I'm new in vision processing.
    I'm using LabView 8.0 with the IMAQ Vision development module. The aim is to control the angle and the contrast of a precalculated image (a greyscale wedge) in a fast loop with a framerate of 60 or 100Hz. Currently I use the time-consuming IMAQ rotate and IMAQ BCG functions. All these function works very fine but a litle bit to slow for my application. I have measure: IMAQ rotate with 40ms and IMAQ BCG with 15ms for an image with 1024 x 768 pixels (8-bit greyscale) on a new PC. I know that an arbitrary rotation is a processor intensive task.
    Please correct me, but i assume that with IMAQ rotate the image rotation will be carried out in the PC RAM. Afterwards the recalculated image will be written in the grafic memory. In a final step the image will be displayed on the monitor by mean of the grafic processor.
    I can imagine there exist a solution or some ideas in the LabView community to use the high end 3D very fast grafic card processor for the rotation and contrast tasks. I hope the approach will accelerate the time of calculation.
    Thanks for your help.
    Best regards
    Ivo Buske

    And of course, the rambling about IMAQ image pointers isn't relevant. (Skip all IMAQ.)
    You might as well send the image once (each time it changes), and rotate it with opengl.
    "Wiebe@CARYA" <[email protected]> wrote in message news:[email protected]...
    Hi,
    If I understand correctly, you just want a gradient screen to rotate, and to be able to adjust it's contrast.
    This can be done a lot easier without an image. If you use OpenGL, you can just draw two triangles with there color set correctly. (You'd be able to make nice rainbow pictures as a bonus.)
    An C/C++ application, or dll, could be made in a few hours by someone experienced with opengl and c++. You could even create an opengl window, and control it with LabVIEW. In other opengl applications there are some practical problems, but some might not matter to your application. Biggest problem is getting feedback (mouse clicks, close, move, resize window etc.) from the OpenGL window to LabVIEW.
    Opening a opengl window, rotating a few polygons, adjusting color, closing window certainly doable.
    Regards,
    Wiebe.
    "ibstein74" <[email protected]> wrote in message news:[email protected]...
    Hi Wiebe, I have a fixed image, created before with array functions, that contain a pure linear greyscale gradient (left side: white / right side: black). I used this image to control a "spatial light modulator". This device is connected to the second DVI graphic card output. The main task of the "spatial light modulator" is to shift the local phase of the reflective light. It works as an spatial resolved "adaptive mirror".&nbsp; The local phase shift correspondes directly to the applied grey level of the image. To change the direction in both dimensions of the reflective light I need to rotate this image (= rotate the phase wedge) Thereby the contrast can adjust the absolute angle of reflection.After I had calculated my greyscale gradient image and applied it to the second DVI output, I want only control the contrast and rotation. I think the graphic card function are very fast. But I have to control the graphic card directly per DLL or C-function node. It must be possible because I can tune the contrast and adjust the rotation manually with the nvidea driver in the windows system manager. I'm&nbsp; waiting for a couple of weeks of an answer from nvidea but it seems that contrast and rotation of an 2D-image is not a real problem for these 3-D guys. :-(I hope of an answer or new ideas.Ivo Buske

  • Loss of sharpness upon image rotation: Aperture vs. other software

    I have carefully studied the resulting loss of sharpness upon rotation/straightening of images. This topic does not apply to 90/180 degree rotations.
    When any image is rotated (be it JPEG or uncompressed), there will be a slight loss of quality (seen as a loss of sharpness) due to interpolation. The method of interpolation applied will affect the degree of quality degradation.
    Simply put, professional applications such as Adobe Photoshop and even Adobe Lightroom use superior interpolation methods when performing rotations (and who knows, perhaps for other transformations/scalings also?!). Apple Aperture, on the other hand, uses an interpolation method that renders a loss of image sharpness on par with inferior consumer-level software such as Google Picasa or iView Media Pro. Yes, folks, here's a clear reason to select Adobe Lightroom over Apple Aperture.
    Please take a close look at the comparison yourself:
    http://web.mac.com/rishisanyal/iWeb/Homepage/Sharpness.jpg
    Make sure you are viewing the image I have posted at 100%, not scaled, in order to clearly see the inferior quality of images rotated with Aperture & Picasa.
    Apple needs to address this problem by implementing a better interpolation algorithm with its straighten tool. It is sad that we are using and paying for a 'Professional' application that yields results on par with FREE software such as Google Picasa.
    As much as I like Aperture for its other features/integration into Mac OS X, I am switching to Lightroom as of now. Straightening/rotating images is an absolute must, used by every photographer on a daily basis. The loss of image quality, therefore, is unacceptable.
    Please post to this thread if you have experienced the same problem or are simply concerned over this. The more people that show concern, hopefully, the more likely Apple is willing to do something about this ASAP.

    Surely any rotation (apart from the 90/180/270 ones) is by-definition a smoothing operation ? You have to take the values from adjacent pixels and combine them based on the rotation, then average (or use a point-spread function) them to rescale the values back into range.
    Looks to me as though the Adobe products are just applying a sharpen operation immediately after the rotation, whereas Aperture isn't. Or Aperture could be using a simple average of the values, where Adobe is doing a gaussian summation-of-components or something similar.
    My guess would be that they "do a quick sharpen", otherwise it would take longer to do the rotate. The only way you'll ever know is if the developers tell you though...
    -=C=-

  • Question about picture imag rotating

    hi..
    i started to learn java couple of month ago
    and now im trying to make a simple racing game
    that is based on map image rotation....
    but the problem is i don't know
    how to rotate my road images in clockwise or
    counter clockwise reacted by certain key on keyboard...
    i hope any one of you guys help me out with this...
    source code or simple example would be great for me
    to understand better..^^;;;
    thx..

    Have fun;-import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Rotate extends JFrame {
       MyPanel panel = new MyPanel();
       public Rotate() {
          setSize(200,150);
          setContentPane(panel);
          setVisible(true);
             while (true) {
                try {
                   Thread.sleep(50);
                   panel.angle++;
                   panel.repaint();
                catch (InterruptedException e) {}
    public class MyPanel extends JPanel {
       ImageIcon image = new ImageIcon("SndImage.jpg");
       int  intW  = image.getIconWidth();
       int  intH  = image.getIconHeight();
       long angle = 10;
       public MyPanel(){ super();}
       public void paintComponent(Graphics g){
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D)g;
          // change the numbers 65 and 55 for different rotation effects
          g2.rotate (Math.toRadians(angle), 65+intW/2, 55+intH/2);
          // 45 and 40 is the starting position
          g2.drawImage(image.getImage(), 45, 40, this);
          g2.dispose();
      public static void main(String[] args) { new Rotate();}
    }

  • How can I get the rotation information of my wrists in Kinect for Windows v2 ?

    Hi,all
    Assuming we make human wrist as the coordinate origin point of a three-dimensional space Cartesian coordinate, then when moving the wrist freely, what is the wrist rotation information in the coordinate system? Can kinect V2 describe it just like the degree
    of roll, pitch and yaw in Face Basics demo given in the V2 SDK Browser?
    Based on Kinect Studio 2.0 on 3D View model, it gives a vector arrow at each joint in real time, when I move, the direction of arrows changes correspondingly. So I think this may help me to get the information I want.  
    Here are my questions:
    1. Could I use Kinect V2 SDK to detect and output this information directly? If not, any suggestion to use the data which SDK output to get rotation information?    
    2. If the Q1 answer is yes, what is the accuracy of the sensor about the degree of roll, pitch and yaw on wrist?
    3. I have read Kinect V2 SDK documentation about the body class, the JointOrientations property description says that "the joint orientations of the body", what I want to know is the joint orientation based on
    what frame of reference? The specific value of body.JointOrientations looks what kind of data?
    Any advise or guidance would be greatly
    appreciated. 

    Thanks Carmine. It's really helps. But I still have some questions to ask.
    As you said "a quaternion value, where the
    Y component rotation is around the direction vector from the parent",and you also said "The
    orientation value is ...not the rotation from the parent",my English is poor so I am a little bit confused. 
    About the accuracy, What is the level of accuracy under ideal conditions?
    And in what circumstance
    that "value could be 180 rotated" thing could happen?
    Thank you for your time

  • Dreamweaver CC has "internal error... while resizing a view" when asked to creat a fluid grid layout

    Excited for expanded fluid grid layout features it had, I got Dreamweaver Creative Cloud SPECIFICALLY for that feature.
    Sign up, download, install went smoothly. Open Dreamweaver CC, create new fluid grid layout, hit OK, name and desigante location of .css file and get the following error.
    "An internal error occurred while resizing a view. (Cview::ResizeFrameBy)"  OK
    I click OK and nothing happens. App freezes. No css, no files. No nothing.
    Have tried restarting, re-installing, different names and destinations for .css file. I'm running Mac 10.8.2
    Literally, this is the first thing I've done w/ an ACC app and I am displeased and frustrated. Getting customer service either via forum or offshore phone call less than ideal.
    (apologies for spelling error in subj. can't edit it)

    Can you try the steps mentioned on the thread: http://forums.adobe.com/message/5420680
    Verified Fix :
    For all the Dreamweaver crashes on opening Fluid Grid pages , Closing Documents or opening files
    Please make sure the default system fonts are all enabled - especially Verdana
    On MAC -
    Open Font BOOK from Applications
    Activate VERDANA FAmily of Fonts
    -Harshit yadav

  • Please add support for JPEG Exchangeable Image File Format (EXIF)

    It seems that now Adobe® Illustrator® can export only to the JPEG File Interchange Format (JFIF). We should have an option to produce the JPEG Exchangeable image file format (EXIF) as well (just like Photoshop does!). Why this is so important to me? I generally work under Illustrator and I often post my work on Behence. I work with 'sRGB IEC61966-2.1' color profile. When publishing I use *.jpg with embedded ICC Color Profile. But it looks like Behence doesn’t fully support the JPEG JFIF – for example it cannot read its icc data correctly. The effect is that my work looses its quality! The only option to produce the JPEG EXIF I have now is to: Export *.ai file to JPEG (under Adobe Illustrator) > go to Photoshop > Create new project > Paste the *.jpg > and Sava As JPEG with icc embedded. This guarantees my files are being processed correctly.
    (JPEG) Formally, the EXIF and JFIF standards are incompatible. This is because both specify that their particular application segment (APP0 for JFIF, APP1 for Exif) must be the first in the image file. In practice, many programs and digital cameras produce files with both application segments included. This will not affect the image decoding for most decoders, but poorly designed JFIF or Exif parsers may not recognize the file properly. ( http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format#Exif_comparison )
    I’ve analyzed my files using JPEGsnoop 1.6.1 (an app by Calvin Hass, http://www.impulseadventure.com/photo/) and here is the result:
    A) an *.jpg file produced with Adobe Illustrator > File > Export > JPEG > ICC profile embedded:
    *** Marker: SOI (xFFD8) ***
    OFFSET: 0x00000000
    *** Marker: APP0 (xFFE0) ***
    OFFSET: 0x00000002
    length     = 16
    identifier = [JFIF]
    version    = [1.2]
    density    = 72 x 72 DPI (dots per inch)
    thumbnail  = 0 x 0
    B) an *.jpg file produced with Adobe Illustrator > File > Save For Web > JPEG > ICC profile embedded:
    *** Marker: SOI (xFFD8) ***
    OFFSET: 0x00000000
    *** Marker: APP0 (xFFE0) ***
    OFFSET: 0x00000002
    length     = 16
    identifier = [JFIF]
    version    = [1.2]
    density    = 100 x 100 (aspect ratio)
    thumbnail  = 0 x 0
    C) an *.jpg file produced with Adobe Photoshop > File > Save As > JPEG > ICC Profile embedded
    *** Marker: SOI (xFFD8) ***
    OFFSET: 0x00000000
    *** Marker: APP1 (xFFE1) ***
    OFFSET: 0x00000002
    length          = 1320
    Identifier      = [Exif]
    Identifier TIFF = 0x[4D4D002A 00000008]
    Endian          = Motorola (big)
    TAG Mark x002A  = 0x002A
    EXIF IFD0 @ Absolute 0x00000014
    Dir Length = 0x0007
    [Orientation ] = Row 0: top, Col 0: left
    [XResolution ] = 720000/10000
    [YResolution ] = 720000/10000
    [ResolutionUnit ] = Inch
    [Software ] = "Adobe Photoshop CC 2014 (Windows)"
    [DateTime ] = "2014:08:02 17:21:15"
    [ExifOffset ] = @ 0x00A8
    Offset to Next IFD = 0x000000D4
    EXIF IFD1 @ Absolute 0x000000E0
    Dir Length = 0x0006
    [Compression ] = JPEG
    [XResolution ] = 72/1
    [YResolution ] = 72/1
    [ResolutionUnit ] = Inch
    [JpegIFOffset ] = @ +0x0132 = @ 0x013E
    [JpegIFByteCount ] = 1006
    Offset to Next IFD = 0x00000000
    EXIF SubIFD @ Absolute 0x000000B4
    Dir Length = 0x0003
    [ColorSpace ] = sRGB
    [ExifImageWidth ] = 200
    [ExifImageHeight ] = 200
    Regards,
    Pawel Kuc

    This is a user-to-user forum and is not monitored by Apple for feedback purposes. You can give feedback to Apple here: Apple - Mac OS X - Feedback

  • Image rotation with fade effect

    I am new to the spry framework and have just started going
    through the examples to see if I could create an image rotator that
    fades the images into each other when changing. I have taken
    snippets from different places to do this and think I have the
    answer but really wanted some feedback to sanity check and let me
    know if this is the best way of doing it. If it is, then I hope
    others will find it useful.
    Here is the url to the example:
    Image
    rotation example
    And here is the code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Sample Image Rotation</title>
    <meta http-equiv="content-type" content="text/html;
    charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible"
    content="IE=7;FF=3;OtherUA=4" />
    <meta name="author" content="www.baytree-cs.com - Peter
    Barkway"/>
    <meta name="copyright" content="(C)2006 Baytree Computer
    Services, All right reserved."/>
    <meta name="abstract" content="ISM Homepage" />
    <meta name="description" content="ISM Homepage" />
    <meta name="keywords" content="ISM Homepage"/>
    <meta name="robots" content="all,index,follow"/>
    <meta name="distribution" content="global"/>
    <meta name="mssmarttagspreventparsing"
    content="true"/>
    <meta name="rating" content="general"/>
    <style type="text/css">
    .element{
    float:left;
    position: relative;
    width: 350px;
    text-align: center;
    #display{
    opacity: 0;
    filter: alpha(opacity=0);
    #animate{
    left: -350px;
    opacity: 1;
    filter: alpha(opacity=100);
    </style>
    </head>
    <body>
    <noscript><h1>This page requires JavaScript.
    Please enable JavaScript in your browser and reload this
    page.</h1></noscript>
    <div id="container">
    <div id="display" class="element"
    spry:detailregion="dsImg"><img src="<?php echo
    $rootDir.$baseDir;?>/{@base}{@path}"/></div>
    <div id="animate" class="element"
    spry:detailregion="dsImg2"><img src="<?php echo
    $rootDir.$baseDir;?>/{@base}{@path}"/></div>
    <p class="clear"></p>
    </div>
    <script type="text/javascript"
    src="js/xpath.js"></script>
    <script type="text/javascript"
    src="js/SpryData.js"></script>
    <script type="text/javascript"
    src="js/SpryEffects.js"></script>
    <script type="text/javascript">
    var dsGalleries = new Spry.Data.XMLDataSet("spry.php",
    "galleries/gallery", { method: "POST", postData:
    "c=1&d=<?php echo $baseDir;?>", headers: {
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    var dsImg = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var dsImg2 = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var imageInterval = 8000; // 8 seconds
    var imageFadeInterval = 4000; // 4 seconds
    var image2Loaded = null;
    var effect = new Spry.Effect.Fade('animate', {from: 100, to:
    0, toggle: true, duration: imageFadeInterval});
    // Prepare an observer that will change the opacity of the
    initially
    // hidden element in oposition with the initially visible
    element
    var obs1 = new Object;
    // On each effect step we calculate the complementary
    opacity for the other image container.
    obs1.onStep = function(ef){
    if (typeof otherEl == 'undefined')
    otherEl = document.getElementById('display');
    var opacity = 0;
    if(/MSIE/.test(navigator.userAgent)){
    opacity = Spry.Effect.getStyleProp(ef.element,
    'filter').replace(/alpha\(opacity([0-9]{1,3})\)/, '$1');
    otherEl.style.filter = "alpha(opacity=" + parseInt(100 * (1
    - opacity), 10) + ")";
    }else{
    opacity = Spry.Effect.getStyleProp(ef.element, 'opacity');
    otherEl.style.opacity = (1 - opacity);
    // Attach the observer to the Fade effect
    effect.addObserver(obs1);
    function fadeInContent() {
    // 1st time in so set the current rows so that the 'animate'
    set is 1 ahead of the 'display' set
    if(image2Loaded == null) {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 2)
    % dsImg.getData().length);
    image2Loaded = 0;
    } else {
    if(image2Loaded) {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    image2Loaded = 0;
    } else {
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    image2Loaded = 1;
    effect.start();
    var obs2 = {
    onPostLoad: function() {
    setInterval("fadeInContent()", imageInterval);
    dsImg.addObserver(obs2);
    </script>
    </body>
    </html>

    I think that I might have got this going now. Here is the
    code if anyone wants to use it.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Sample Image Rotation</title>
    <meta http-equiv="content-type" content="text/html;
    charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible"
    content="IE=7;FF=3;OtherUA=4" />
    <meta name="author" content="www.baytree-cs.com - Peter
    Barkway"/>
    <meta name="copyright" content="(C)2006 Baytree Computer
    Services, All right reserved."/>
    <meta name="abstract" content="ISM Homepage" />
    <meta name="description" content="ISM Homepage" />
    <meta name="keywords" content="ISM Homepage"/>
    <meta name="robots" content="all,index,follow"/>
    <meta name="distribution" content="global"/>
    <meta name="mssmarttagspreventparsing"
    content="true"/>
    <meta name="rating" content="general"/>
    <style type="text/css">
    .element{
    float:left;
    position: relative;
    width: 350px;
    text-align: center;
    #display{
    opacity: 0;
    filter: alpha(opacity=0);
    #animate{
    left: -350px;
    opacity: 1;
    filter: alpha(opacity=100);
    </style>
    </head>
    <body>
    <noscript><h1>This page requires JavaScript.
    Please enable JavaScript in your browser and reload this
    page.</h1></noscript>
    <div id="container">
    <div id="display" class="element"
    spry:detailregion="dsImg"><img src="<?php echo
    $rootDir.$baseDir;?>/{@path}"/></div>
    <div id="animate" class="element"
    spry:detailregion="dsImg2"><img src="<?php echo
    $rootDir.$baseDir;?>/{@path}"/></div>
    <p class="clear"></p>
    </div>
    <script type="text/javascript"
    src="js/xpath.js"></script>
    <script type="text/javascript"
    src="js/SpryData.js"></script>
    <script type="text/javascript"
    src="js/SpryEffects.js"></script>
    <script type="text/javascript">
    var dsGalleries = new Spry.Data.XMLDataSet("spry.php",
    "galleries/gallery", { method: "POST", postData:
    "c=1&d=<?php echo $baseDir;?>", headers: {
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    var dsImg = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var dsImg2 = new Spry.Data.XMLDataSet("spry.php",
    "gallery/photos/photo", { method: "POST", postData:
    "c=2&d=<?php echo
    $baseDir;?>/{dsGalleries::@base}&s={dsGalleries::sitename}",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" } });
    var imageInterval = 4000; // 8 seconds
    var imageFadeInterval = 2000; // 4 seconds
    var effect = new Spry.Effect.Fade('animate', {from: 100, to:
    0, toggle: true, duration: imageFadeInterval});
    // Prepare an observer that will change the opacity of the
    initially
    // hidden element in oposition with the initially visible
    element
    var obs1 = new Object;
    // On each effect step we calculate the complementary
    opacity for the other image container.
    obs1.onStep = function(ef){
    if (typeof otherEl == 'undefined')
    otherEl = document.getElementById('display');
    var opacity = 0;
    if(/MSIE/.test(navigator.userAgent)){
    opacity = Spry.Effect.getStyleProp(ef.element,
    'filter').replace(/alpha\(opacity([0-9]{1,3})\)/, '$1');
    otherEl.style.filter = "alpha(opacity=" + parseInt(100 * (1
    - opacity), 10) + ")";
    }else{
    opacity = Spry.Effect.getStyleProp(ef.element, 'opacity');
    otherEl.style.opacity = (1 - opacity);
    // Attach the observer to the Fade effect
    effect.addObserver(obs1);
    function fadeInContent() {
    // 1st time in so set the current rows so that the 'animate'
    set is 1 ahead of the 'display' set
    //use this flag to avoid the effect running on load
    if (typeof image2Loaded == 'undefined') {
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 2)
    % dsImg.getData().length);
    var curRow = dsImg.getCurrentRow();
    image2Loaded = 0;
    } else {
    if(image2Loaded) {
    var img = document.getElementById('display');
    dsImg.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    var curRow = dsImg.getCurrentRow();
    image2Loaded = 0;
    } else {
    var img = document.getElementById('animate');
    dsImg2.setCurrentRowNumber((dsImg.getCurrentRowNumber() + 1)
    % dsImg.getData().length);
    var curRow = dsImg2.getCurrentRow();
    image2Loaded = 1;
    var imgPath = '<?php echo $rootDir.$baseDir;?>/' +
    curRow["@path"];
    var gImageLoader = new Image();
    gImageLoader.onload = function()
    effect.start();
    gImageLoader.src = imgPath;
    var obs2 = {
    onPostLoad: function() {
    setInterval("fadeInContent()", imageInterval);
    dsImg2.addObserver(obs2);
    </script>
    </body>
    </html>

  • Some email images do not show while using the icloud web app.  I can see the images on my IOS devices and in gmail but I only see a small gray box in the icloud web mail app.  Load HTML images is checked in preferences.

    Some email images do not show while using the icloud web app.  I can see the images on my IOS devices and in gmail but I only see a small gray box in the icloud web mail app.  Load HTML images is checked in preferences.  Is there a solution to this issue?

    I've seen the opposite issue.  My wife recieved an email with jpg attachments.  She couldn't see or print them on her iPhone 4S but they showed up fine in iCloud or in the mail app.  I had her forward the email to herself and then they showed up.  I assume there is an issue with how Apple is processing the attachments and resending causes them to get reformatted in a way that makes them easier to handle.
    So yeah.  Seems like some bugs.  Hope Apple fixes them soon.

Maybe you are looking for

  • In PE11 the quality of the photos in the slide show are inferior to those in the catalogue.  Why?

    I have been on the phone for a few hours to Adobe but they are stil investigating.  When I produce a slide show using Elements 11 the pictures are no way near as clear as they appear in the folders.  I just want to show my pictures without them looki

  • Global Correlation and Application Failed

    Hi, People. I have IPS4270-20-K9 with version 7.0(3)E4 and signature version 572. In Sensor Health show me a problem critical, with: - Application Failed - Global Correlation sensor#sh statistics global-correlation Error: getGlobalCorrelationStatisti

  • DAQmx broken even after full re-install

    I'm having a nightmare problem with DAQmx libraries having somehow become corrupt in my LabVIEW installation on my laptop. It's LV8.5 and I'm on Windows XP SP2. The problem is that they can't find the nilvaiu.dll. I get the error: "nilvaiu.dll a dyna

  • Toshiba Tecra R840-00L: Recovery Media & 2010 MS Full Office ??

    Hello; 1. I've just bought another Toshiba Notebook: Tecra R840-00L. I'm going through the 20-page abbreviated User Information Guide supplied with the unit. I haven't started the computer yet. There're a couple of concerns, and I'd very much appreci

  • HELP When I opened Premiere Elements 10 half of the picture is blocked out

    I have spent ages on this movie and all of a sudden half of the pictures I have blue screened on are blocked out. I thought it just hadn't loaded properly so I reopened it and uploaded it to youtube but it still stayed the same. It has been fine unti