Images, JFS, CSS - How to display the correct aspect ratio

Hello,
This is not really related to Jave ServerFaces, however, since I am using JSF to build my application, I thought I would post it here.
I am trying to display images by using the following tag
<h:graphicImage style="height:200;width:140;border-width: 0;"
value="img/#{group.items[1].picFileName}-s.jpg"
alt="#{mainMenuController.item.customerFacingName}"/>The above tag is doing what it is supposed to do, that is display an image with height: 200 and width: 140, which is equal to the aspect ratio
of 1.43 (=200/143).
However, some of the images that I want to display, do not have
the aspect ratio of 1.43. As a result of that, their height or width is modified according to the above values. This distorts some of the imsage.
I was wondering if some one else had faced that problem and solved it. One solution that can work is to edit the images to produce an aspect ratio of 1.43, however, editing the individual images is not feasible.
One probable solution that comes to mind is via CSS: that is by FLOATing the image in a box of fixed height and width. By doing this, the aspect ratio of the image will not be affected. I do not know if FLOATing an image in a box is possible or not. I do not know how to float an image in a box.
More over, I am using Tiles to control the layout. Defining an image box within a <DIV> tag might complicate things.
Any ideas, comment, suggestion will be heplful!
Rauf

Put the post in a HTML/CSS forum....

Similar Messages

  • Maximize a panel maintaining the correct aspect ratio

    Hello everyone,
    how can I maximize a panel maintaining the correct aspect ratio?
    Thanks  

    Hi,
    this can't be done automatically, since when you enable panel sdjust on rescaling and maximize it it will scale each dimension independent from the other. That is, a panel developed for a 4:3 resolution will appear stretched if maximized on a 16:9 screen.
    If you have only a few controls on the panel you could disable automatic rescaling and add an horizontal and vertical hidden splitter attaching all controls to them. When you want to maximize the panel you will need to calculate the necessary adjustment on each dimension and move the splitters accordingly with OperateSplitter so that they resize the controls. Next you can maximize the panel.
    In case you have a lot of controls attaching all them to the splitters can be a hassle; in this case you can enable resolution adjustment, change panel sizes calculating the maximum dimensions that respect aspect ratio, next disable resolution adjustment and finally maximize the panel.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Will FCP tell me what the 'correct aspect ratio' is?

    Hi,
    This isn't a problem, I'm just curious.
    When I import clips in to FCP I am allowed to view them in their correct aspect by checking 'Correct For Aspect Ratio' using the 'Window Zoom' button in the canvas.
    Is there a way of seeing the correct aspect frame size in the browser?
    For example, I shoot in 'squeeze' mode on my DVX100b. That footage is recorded/imported at 720x480. FCP allows me to edit it as it should look. And then it's up to me to 'un-squeeze' it. That's fine, no problem. But I'm wondering if final cut pro has any idea what the un-squeezed frame size should be (or is it just automatic) and does it tell me anywhere.
    Just wondering.
    Thanks,
    Double ohh

    The unsqueezed size is 720x480, and you'll see it in the browser under "frame size" (you may have to enable this by control-clicking on the top of any browser column).
    If the anamorphic column is checked in the browser, you'll always get a correct display in FCP. As you've discovered, you'll have to modify your output files (either by changing the frame size or changing the movie properties in quicktime player) to get them to display correctly on a computer screen. Your DVD or video player will always display widescreen material correctly once you've authored your disks in widescreen and set up your DVD player to match your TV screen aspect.
    Best of luck.

  • FCP project not the correct aspect ratio when exporting to Quicktime

    Hello All;
    I am trying to export a FCP project in its native resolution (1440 X 1080) to Quicktime but everytime I try, the aspect ratio is messed up and people look taller and thinner than they should.
    The project is a resolution of 1440 X 1080 as determined by examining the sequence settings in FCP.
    I configure quicktime (see below) to a resolution of 1440 X 1080.
    So why isn't my Quicktime video the correct resolution when I play it with the IMac's Quicktime player ? I shrink the player to 1/2 size to fit it all on the screen.
    My exact settings are below ...
    Export - Using Quicktime Conversion
    Format - Quicktime Movie
    Video Settings - Compressor - MPEG-4
    Quality - Best
    Not sure if I changed the framerate - if I did, I probably changed it to 29.97
    I didn't touch the other settings in the video settings - left them to default
    I didn't change the filter settings - I left them at default
    Size - 1440 X 1080 (The actual resolution of my source video)
    I checked the box - preserve aspect ratio using letterbox (If applicable)
    Other settings were left at default
    Sound Settings - Format - AAC
    Rate - 48 KHZ
    Render Settings - Quality - Best
    Target Bitrate - 128 KHZ (This was left at default - I did not change it)
    Prepare for Internet Streaming - Fast Start checked (This was default - I did not change it)
    All other settings not specifically mentioned were left at default.
    Thanks. Tim

    I don't have much of an answer for you, but to test try not checking the preserve aspect ratio. Rather than reexport the entire 1 hour just export 10 seconds so that you can trouble shoot different things.
    Hope that helps a bit,
    Eric

  • How to keep the stage aspect ratio when stage width=100%?

    Hey,
    if I would like to make an animation that always fits into the browser window by fitting the width to 100% I'm having trouble keeping the aspect ratio of the stage's height. I can only configure 100% there which will stretch the content also to 100% of the browser window's height. If I configure a pixel value for the height, then I am also stuck on this value.
    All I want is the stage to adjust to the width of the browser window, and the height of the stage to preserve the aspect ratio depending on the width.
    this video shows what I mean. unfortunately I am not familiar with coding: http://www.youtube.com/watch?feature=player_embedded&v=hrLt0Y9QAY8
    Can somebody help me?

    sorry can't get the code working properly onwith the html code function. Sorry for that

  • Cannot set correct aspect ratio.

    After Comcast completed maintenance somewhere on the network, the aspect ratio on my television changed, and now it is displayed in a zoomed in format that I cannot fix with any of the settings on my television.  With Set by Program or Just Scan, the graphics on CNN are too wide for the screen, for example--same on Bloomberg or anywhere that has graphics displayed.  On 4:3 format everything looks compressed and squeezed together.  16:9 is the same as Set by Program and Zoom is way too zoomed in.  I changed the 4:3 setting on the box, but it just made it default to non-4:3 format on those non-HD channels.  What has changed and how can I return to the correct aspect ratios for my television?

    Never mind, I figured it out myself.  I continued trying different user setting combinations on the box and finally it worked.  I think the "Pass Through" setting is what did the trick.  Everything is now in the correct aspect ratio and the graphics are displayed properly.

  • Exporting current frame with correct aspect ratio

    Hi and thanks for viewing my question. I've created a video in Motion 3 using the preset HDV1080i60 which is the preset for the video I'm using in Final Cut. It's a video of images, text elements and a background video that I created from scratch not a video recorded with an hd cam. I export the video and import to Final Cut and everything is great including the correct aspect ratio. When I export current frame from Motion no matter what setting I use it changes the aspect ratio so it isn't in widescreen format anymore. Any suggestions how to export a frame to maintain the widescreen format like it does when I export as a video? Thanks for the help.

    Because Motion is exporting with square pixels...
    If you have photoshop, you can do the following:
    Now make a new image, go to the HDTV 1920x1080 preset, but change the width to 1728 hit OK... Copy and paste your original image from Motion and scale horizontally to fit (helps if snapping is turned on).
    +How I arrived to this conclusion...+
    I opened the exported still in photoshop, changed the pixel aspect ratio to d1/ntsc widescreen. Made a new image with the HDTV setting, copied and pasted the image into the new ps file, command clicked the layer (which selects the pasted image), went to edit crop. Then I checked the image size and it gave me 1728x1080...

  • Cannot correct aspect ratio

    Hi,
    I'm using FCP 5.1.4 and I'm having a problem with the aspect ratio of the clips that were given to me. And pardon me in advance if some of what I write sounds silly, but I'm a beginner at FCP.
    I assumed that the clips were shot using the "Anamorphic" feature of the camera, since they all look 16:9.
    I started the editing with a sequence set in PAL CCIR 601 w/ the "Anamorphic 16:9" checkbox ON (i.e.: checked), but from the beginning the clips did not have the same look in the Viewer and in the Canvas. I thought that was normal and that the final edit would look ok when thrown to Compressor. But that was not the case: the image occupies LESS space than either a 16:9 or a 4:3 aspect ratio!!
    It seems to be letterboxed, but on the 4 sides of the screen!!
    Digging further, I found out that one can activate an "Anamorphic" option on a per-clip basis, when right-clicking on it and choosing "Item Properties > Format". Which I did for all the source clips in the Browser, as well as all the items on my timeline. But it does not seem to make a difference.
    I've posted a view of my current desktop, so you can figure out what I'm talking about: http://mystere.free.fr/FCP_desktop.jpg
    As you can see, the picture in the Viewer is WIDER than the same picture in the Canvas.
    My sequence settings are shown here: http://mystere.free.fr/Seq_settings.jpg
    And the clip settings are here: http://mystere.free.fr/Clip_settings.jpg
    Notice the checkmarks on the "Anamorphic" line.
    Of course, there's something I am not doing right, but I don't know what it is.
    What do I have to do so my clips in the Canvas have the appropriate aspect ratio, even if they must be squashed when working with them in the Timeline: what's important is that upon rendering through Compressor, I get a 16:9 movie.
    I hope I need not redo all the editing with different settings from start!!!
    Thanks in advance for your help!
    K.
    iMac G5/1.8GHz - 20"/2GB/HD320   Mac OS X (10.4.10)   PowerBook G4/667GHz - 15"/512MB/HD80

    Judging from the pic of your workspace, your clips are not anamorphic 16:9.
    Instead, they are letterboxed 16:9, meaning they are 4:3 clips with a 16:9 matte applied, presumably in camera.
    To edit with the correct aspect ratio:
    Select all your clips in the Browser in List view, then control-click over one under the Anamorphic column. Select No from the contextual menu to deselect Anamorphic.
    Then, alter your Sequence Settings by deselecting Anamorphic there.
    Finally, select all your clips in the timeline - they'll probably still be windowboxed - and press Option-Command-V to bring up the Remove Attributes dialog. Select Distort from the Video options, then click OK.
    You should then be good to go.
    Or where you set on making an anamorphic DVD?

  • Correct Aspect Ratio, ON or OFF?

    Should I have correct aspect ratio on or off when I am editing my projects?
    Thanks for any help.

    If you want to see what your final footage will look
    like in the correct aspect ratio, then turn it on. I
    usually leave it on.
    Thanks a lot for the advice.

  • How to display the image which in KM folder using url iview

    Hi Friends
    How to display the image, which is under KM folder structur using the url iview.
    i trying using url iview url as  \document\testfolder\abc.jpg as url for the iview.
    but its now working .. so please help me how to slove this problem
    If is not the correct way then please suggest me best way to achive this.
    Thanks
    Mukesh

    Hi Mukesh,
    I think this may work,
    1, Create a HTML Layout.
        You can put your image wherever  u want with HTML Codes.
        Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
        With this, u can use the standard KM commands also.
    2, U need to use KM Navigation iView for this rather than KM Doc iView.
    3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
    Regards
    BP

  • How to locate the correct image file before reading/saving it

    Hi,
    I would like to find out how to copy/save/read image files from certain website in Java, particularly to locate the right one from various relative URL links on the same website. Below is an example to look at:
    On the main web page
    By selecting (http://www.abc.com/Public/Details.aspx?adid=2007103609) on a tiny camera icon that consist of source code (<td class="even"><a target="_blank" href="http://www.abc.com/Public/Details.aspx?adid=2007135110"><img src="/images/camera.gif" width="19" ...></a></td>) directed me to another page with the actual photo.
    The source code of this secondary page where the photo is located are as follows:
    <script language="JavaScript" type="text/javascript"><!--
    </script>
    <style type="text/css">@import url("http://fdimages.def.com.au/cui/netstrip-20050427.css");</style>
    <div id="networkStripTop">
    <a href="http://www.def.com.au/" onclick="linktop(this);" target="_top"><img src="http://fdimages.def.com.au/cui/digital.gif" height="17" width="95" class="logo" alt="DEF Digital" /></a>
    <div class="links">Any suggestion would be much appreciated.
    Many thanks,
    Jack

    Hi All,
    Could someone give me a hand with suggesting on how to locate the correct links (from multiple web pages) of the image file? I still could not proceed further on this issue.
    There is no problem with saving/reading the file once it is accurately identified.
    Please move it to the Java Technology & XML forum if it is not already in it.
    Many thanks,
    Jack

  • How to Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER in VC++ ?

    Hi,
    I have :  -  IMAQ1394 2.0.1
                  -  NI Vision 7.1
    In VB, I can Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER :
        Dim Image0 As New CWIMAQImage
        imaq1394SnapCW(sid0,Image0)
        CWIMAQViewer1.Attach Image0
    Now,How can I do this in VC++6.0?
        I tried:
                  C_CWIMAQImage m_imgViewer1;
                  m_imgViewer1 = m_CWIMAQVision1.CreateCWIMAQImage();
                  m_CWIMAQViewer1.Attach(m_imgViewer1);
                  imaq1394SnapCW(Sid,m_imgViewer1);  <--there is no "imaq1394SnapCW "function in VC++,why?
        Please help me!
        Thank you!

    For people looking back at these old posts regarding
    CWIMAQViewer - it was not made to be used in the C environments and is made
    for VB.
    Refer to the following locations for displaying images in C
    environments:
    Start»All Programs»National Instruments»Vision»Documentation
    Start»All
    Programs»National Instruments»Vision»Text Based Examples
    Make
    sure that you look at the examples and documentation that is in
    reference to the C environments not the VB environments
    Vince M
    Applications Engineer

  • How to configure the ST03N and ST06 for displaying the correct data?

    Hello guys,
    I have just finished a internal project installation following the installation guide.
    Our R/3 System can run correctly. However, when I type st03n, it displays some strange data instead of the real server information. and also in st06, I cannot get the real OS information.
    The OS collector said that saposcol is not running because of no process id found.
    But in the OS level, I've checked the server and saposcol -s said that the saposcol is running correctly.
    I searched some notes and modify the processor of the SAPOSCOl service, too. But nothing changes.
    I think the ST06 issue is the root cause of the ST03N.
    I just wonder that how I could configure the system to make the ST03N or the ST06 display the correct statistics?
    Thanks in advance.

    I got the answer myself.
    I didn't know there were some standard jobs that are required to scheduled for a live R/3 System.
    In SM36, find the standard jobs and input 'bc' in sap components and select the jobs scheduling job and set it as periodly run jobs(hourly).
    then release the schedule.
    And note 16083 has all the information.

  • How do I display the correct value when using SELECT_LIST_FROM_QUERY

    I have an updatable report that displays the possible values for a field.
    I'm using HTMLDB_ITEM.SELECT_LIST_FROM_QUERY, so obviously I have to process the record manually.
    However, I need the trick to display the correct value as selected before processing the records.
    I appreciate your help.
    Thanks
    Juan

    Thank you.
    So, I just need to put the field name in the second argument.
    I have it working now.
    Thanks again
    Juan

  • I have a new notebook with windows8. When I open an image in photoshop it is not the correct color.

    The icon is the correct color and if I open the image in another app it is the correct color. How do i fix this?

    Good day!
    What is the »correct color« and how do you know that?
    In which other applications does the image look different?
    What are the Edit > Color Settings in Photoshop and does the image have an ICC profile embedded or not (you can set the Info Panel’s Panel Options to display »Image Profle«)?
    Regards,
    Pfaffenbichler

Maybe you are looking for