5 Replies Latest reply on Oct 3, 2008 11:52 PM by mdesignz

    e;image distortion

    mdesignz

      Hello,
      Environment:  Seam 2.1.0-SNAPSHOT, JBoss 4.2.3.GA


      I copied one of the images off of www.jboss.org (http://www.jboss.org/file-access/default/theme/images/spotlights/spotlightdzonejsfflex.png) and placed it in the repeat.xhtml file in the Excel examples.
      While the image is rendered in the spreadsheet, it's distorted to produce a square image (the original is rectangular).  It appears that it's making both image dimensions equal to the max dimension?


      Syntax for the line I added immediately after the e:worksheet tag:


      <e:image URI="http://localhost:8080/seam-excel/test.png" startRow="0" startColumn="0"/>

      Square images (like the Seam logo) look just fine.

        • 1. Re: e;image distortion
          nickarls

          Typo, I have getHeight() for both height and width estimation, I'll also try to make a change to the keep the ratio better.

          • 2. Re: e;image distortion

            I think this is known, but I couldn't find the post in the forum.

            • 3. Re: e;image distortion
              nickarls

              That was when I fixed int/int rounding errors, now its copypaste-errors :-)

              • 4. Re: e;image distortion
                nickarls

                Committed.


                Note that sizing the image is a little tricky - JExcelAPI works in rowspans and colspans of cells and as long as they are standard sized everything is fine. Then you apply e.g. autosize to column and it will twist the ratio since the row height is still the same but the width of some of the columns the image is spanning has increased. I'll try to see what could be done...

                • 5. Re: e;image distortion
                  mdesignz

                  Thanks for doing this!  The ideal case would be to either specify one or more dimensions, or maintain the aspect ratio if the size did change.  In my case, I have a silly user requirement which sets one of the column widths where the image appears, so I can diddle the columnSpan to make it look okay.   Once again, thanks for all of your help!