commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Lucas (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SANSELAN-54) Tiff (exif) tags of type double written in wrong byte order
Date Sun, 16 Oct 2011 23:08:12 GMT

    [ https://issues.apache.org/jira/browse/SANSELAN-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128540#comment-13128540
] 

Gary Lucas commented on SANSELAN-54:
------------------------------------

Thanks.  I had no idea about the rule about left shifting an int into a long.  It makes sense,
though.  I'm really glad you caught that before the code got into SVN.    I did perform testing
by comparing my stuff to the Java nio ByteBuffer class and everything looked okay.  I'll have
to review the tests to see if they were defective some how.  
   
Gary


---
Gary W. Lucas, Senior Software Engineer
Sonalysts, Inc
215 Parkway North
Waterford, CT 06320
(860) 326-3682


                
> Tiff (exif) tags of type double written in wrong byte order
> -----------------------------------------------------------
>
>                 Key: SANSELAN-54
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-54
>             Project: Commons Sanselan
>          Issue Type: Bug
>         Environment: Tested under Windows XP.  Potentally all platforms.
>            Reporter: Gary Lucas
>         Attachments: Sanselan-54-ExifByteOrder.patch
>
>
> Reviewing BinaryFileFunctions.java method convertDoubleToByteArray and convertDoubleArrayToByteArray
there are two blocks of code, one for BYTE_ORDER_MOTOROLA (big endian) and one for BYTE_ORDER_INTEL
(little endian).  These are backwards.  
> The convertByteArrayToDouble, on the other hand appears to be correct.  A reasonable
test procedure would be to see if these two sets of methods are mutually consistent.
> The same problem appears to be the case for the "Float" variants, but not the Integer
variants.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message