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?

Similar Messages

  • 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

  • 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.

  • How do I automatically scale a layer to fit a canvas while maintaining the original aspect ratio?

    I'm currently tasked with reformatting 3,000 product images (thumbnail, normal, and large sizes for each) for a new online store. To do that, I'm trying to create a Photoshop (CS6) action that can automate the process as much as possible because I have a hard deadline and not a lot of time to get it all done. Where I'm running into issues is scaling the images automatically once I've used File-->Place. My canvas sizes are all square (670px X 670px, 250px X 250px, and 125px X 125px), but the product images I'm placing on the canvases are almost always rectangular with the height greater than the width at about a 2:3 ratio. I need to scale them so that the image is touching the top and bottom edges of the canvas and the width is adjusted accordingly with the image centered horizontally.
    I found the program below on another thread, but it's not working exactly like I need it to. It mentions "maintain aspect ratio," but when I run it, the image I'm trying to place ends up getting stretched to fill the entire canvas rather than the width adjusting to the height once the height has reached its maximum. I have no experience with JavaScript, so I'm having a difficult time adjusting the code to meet my needs. Any help would be greatly appreciated since I am a writer who is WAY out of his comfort zone.
    var maintainAspectRatio;// set to true to keep aspect ratio 
    if(app.documents.length>0){ 
        app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')'); 
    function FitLayerToCanvas( keepAspect ){// keepAspect:Boolean - optional. Default to false 
        var doc = app.activeDocument; 
        var layer = doc.activeLayer; 
        // do nothing if layer is background or locked 
        if(layer.isBackgroundLayer || layer.allLocked || layer.pixelsLocked 
                                || layer.positionLocked || layer.transparentPixelsLocked ) return; 
        // do nothing if layer is not normal artLayer or Smart Object 
        if( layer.kind != LayerKind.NORMAL && layer.kind != LayerKind.SMARTOBJECT) return; 
        // store the ruler 
        var defaultRulerUnits = app.preferences.rulerUnits; 
        app.preferences.rulerUnits = Units.PIXELS; 
        var width = doc.width.as('px'); 
        var height =doc.height.as('px'); 
        var bounds = app.activeDocument.activeLayer.bounds; 
        var layerWidth = bounds[2].as('px')-bounds[0].as('px'); 
        var layerHeight = bounds[3].as('px')-bounds[1].as('px'); 
        // move the layer so top left corner matches canvas top left corner 
        layer.translate(new UnitValue(0-layer.bounds[0].as('px'),'px'), new UnitValue(0-layer.bounds[1].as('px'),'px')); 
        if( !keepAspect ){ 
            // scale the layer to match canvas 
            layer.resize( (width/layerWidth)*100,(height/layerHeight)*100,AnchorPosition.TOPLEFT); 
        }else{ 
            var layerRatio = layerWidth / layerHeight; 
            var newWidth = width; 
            var newHeight = ((1.0 * width) / layerRatio); 
            if (newHeight >= height) { 
                newWidth = layerRatio * height; 
                newHeight = height; 
            var resizePercent = newWidth/layerWidth*100; 
            app.activeDocument.activeLayer.resize(resizePercent,resizePercent,AnchorPosition.TOPLEFT); 
        // restore the ruler 
        app.preferences.rulerUnits = defaultRulerUnits; 

    Hum Im not sure Im getting you here… Have you looked at Image Processor…?
    Why are you NOT just using Fit Image and canvas size in your actions…?
    These are all built-in to Photoshop.
    If you wanted to do all 3 sizes in the 1 fly-bye then use script to process…
    If you need extra file naming conventions then script would probably be best…
    All of the above should have NO trouble handling your 3k files…

  • 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....

  • 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...

  • 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.

  • 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.

  • 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 for 4:3 and 16:9 SD output

    Hi guys,
    I've built a slideshow in FC with HD settings (1440 x 1080px), exported via compressor and imported into DVDSP. That's all fine however . . .
    The output requested is a DVD playable at 16:9 SD and this is where I have a small problem with the first tests I've done.
    To cover all bases, my DVDSP settings are SD 4:3 and HD 1440 x 1080i, 16:9 PanScan and Letterbox. The end result played back on the Mac looks great and the aspect is spot on. The ultimate test was to play it on 2 different DVD players on 2 different PAL TVs and the result is world's apart even after playing with the respective aspect ratio adjustments on the TVs.
    My problem is that I don't know what these DVDs will be played on and concerned they'll be cropped off or distorted and unwatchable.
    Is there something I'm missing or a way to avoid this uncertainty? My deadline is imminent and any help would be priceless.
    thanks guys
    Chuck

    What you should do for SD is export the FC timeline out to an SD preset (either PAL or NTSC as applicable) and you need to set the tracks to 16:9 Letterbox, not Pan & Scan or Pan & Scan Letterbox. The track will be 16:9 on 16:9 screens and letterboxed on 4:3 Screens. (You can also set up your own SD Compresser settings, make the aspect raito 16:9.)
    People can always mess with settigs so there is no 100% way to ensure it will always look correct, but the above takes care of matters for the most part.
    As an aside when you say world's apart, what was happening?

  • How to crop a whole selecton of pictures with the same aspect ratio?

    I want to crop a whole selecton of pictures with the same aspect ratio.
    I shoot my pictures in 4:3 and I want to use Lightroom to crop them all for example to 16:9.
    So I have only to adjust the size and it's done!
    I use Lightroom 4.4

    Thanks. It works! Prima!
    It's a little bit difficult for me to write and understand the English terms correctly, cause I am German.
    I did not recognize, that I had to go to the Library Module!
    Here I repeat Rikk's way in German:
    Im Bibliothek-Modul
    Rasteransicht
    Bilder selektieren
    Im Menufeld Ad-hoc Entwicklung:
    Freistellungsfaktor einstellen: 16:9

  • In Premiere Pro, is it possible to change the project aspect ratio once started?

    In Premiere Pro, is it possible to change the project aspect ratio once started?

    On a side note, 'projects' do not have as aspect ratio, sequences and footage do.  And a project can contain any number of sequences or footage.

  • How to capture frames in Premier Pro to edit in Photoshop with correct aspect ratio.

    I am using Premier Pro and Photoshop CS5 in Creative Studio CS5.  I have read and understand several help articles on square and rectangular pixels used for various video aspect ratios.  I am using the camera button on the bottom right of the Program monitor to captue a frame and save as a jpg file.  When I open the jpg file in Photoshop to edit for a DVD disc cover using the Elliptical Marquee Tool with a fixed ratio of 1 to 1, the result is not the circular image I need but wider.  This must be an aspect ratio conversion that I am missing.  I have seen conversions that correct this by lengthening the height but the image is also lengthened and thus results in a distiortion.
    How do I correctly deal with this aspect ration conversion between Premier Pro and Photoshop without distortion?

    This is most likely a PAR (Pixel Aspect Ratio) issue. With SD (Standard Definition) Video, you can have Standard 4:3 w/ PAR = 0.9, Widescreen 16:9 w/ PAR = 1.2, or a non-standard 4:3 w/ PAR = 1.0 (rounded PAR's for NTSC).
    In Ps, you have the ability to adjust the PAR, under the Image menu from the Toolbar. For use on a DVD, you would choose a PAR of 0.9 if you have Standard 4:3, or 1.2 for Widescreen 16:9.
    With the PAR adjustment, to match your Video footage, you should then be able to get what you want, without the distortion. Also, note that one can change how the PAR displays in Ps. By default, it will be Square Pixels, or PAR = 1.0, and you should get an info message that the display is not showing the exact PAR. This can also be changed in Ps.
    For more discussion on PAR, see this article: http://forums.adobe.com/message/3456609#3456609
    Good luck,
    Hunt

  • Correct Aspect Ratio or Recapture

    I've just started a project shot with 2 Sony HDV cameras, and my usual capture and sequence settings are set to NTSC DV Anamorphic for full screen 16:9. I digitized 8 hours of HDV tape, creating many subclips and organizing them into various bins. However, when I started putting my first timeline sequence together, I noticed that the 16:9 footage was horizontally stretched, slightly "squashing" the people in the shots and not filling even the title safe area. When I uncheck "correct for aspect ratio" the footage looks better, but it's letterboxed within the 16:9 title safe area in my NTSC DV Anamorphic canvas and viewer. I randomly checked one of the captured clips in the browser to see the format setting, and it said NTSC DV, (NOT anamorphic). Is there any way to correct this mistake without recapturing everything, and if I have to, will all my organizing and timeline information stay intact, or do I have to start (gulp!) all over?
    Jeff

    Thanks, but when I right click "remove attributes" the "distort" button is grayed out. (when I toggle the anamorphic checkmark ON for each clip in the browser, the image stretches horizontally, beyond the anamorphic 'safe action' lines. When I toggle it OFF, the image looks normal, but fills only the anamorphic 'safe title' area. I'm starting to think that all 8 HDV master tapes were captured with the standard NTSC DV setting instead of NTSC DV Anamorphic, which the project is set for. I know I can use the motion tab to blow everything in the timeline up 120% and it fills the frame nicely, but I lose 20% of the HD resolution. I'm starting to think more about recapturing. The original tapes were all digitized using the "Capture Now" setting but with device control ('VTR OK', so there's time code). If I decide to recapture everything, making sure that the capture setting is NTSC DV Anamorphic, will I be able to save all my 4 days of work creating many subclips, bins, and two timeline sequences? If so, how can I do it? I've never had to do this before.

  • Why do premium movie channels alter the widescreen aspect ratio?

    Why do channels like HBO HD and Cinemax HD change the aspect ratio of movies?  I have seen movies that I own on dvd or blu-ray that are 2:35:1 or 2:40:1 aspect ratio (meaning very wide and you see some thin black bars at the top and bottom of your screen) but when they are broadcast on these movie channels it looks like the films are  partially panned & scanned down to a 1:85:1 ratio (not as wide and the bars are gone). 
    This is really stupid, and the movies are not being shown in their full widescreen orginal presentation.  What do they have to gain by cutting off parts of the picture?  I have noticed some channels like showtime don't do this, but most do.  Obviously this isn't verizons doing its the channel providers, but it's annoying. 
    And what's with all the logos all over the premium channels nowadays?  These are paid channels the screen should be clear of any and all logos and any add overlays.  If I want to know the channel and rating I'm watching I'll just press the guide button, it's overkill.

    film11 wrote:
    They do this for the OnDemand movies as well.  I agree...it is VERY annoying.   There is NO reason for it.  Sure,there are some people out there who want their screen filled, but they can always use the ZOOM button to do that.  It's a terrible practice and I never watch movies on channels that crop them (and am cancelling the channels that do it when my contract bundle expires).  The only channels that show movies in the correct ratios are SHOWTIME, THE MOVIE CHANNEL, and HDNet MOVIES. (EPIX shows old movies in OAR but crop newer films.)
    The others, Notably HBO that started this practice, do occassionally show OAR.  But usually only when the director specifically had in his agreement that his picture would only be so displayed when marked to TV channels.

Maybe you are looking for

  • Newbie help please:  "Validation of XML file failed."

    Hopefully my question is short and easy. I'm a developer and haven't used FrameMaker before. However for unforeseen reasons, I've inherited our technical help documentation constructed in FrameMaker which I've never used. Unfortunately I'm under a ve

  • Window 8.1 Kernel_Security_Check_Failure

    My PC ran into problem , The window is 8.1 ,this is not before window 8.1 ,This error started after i have installed the window 8.1 Plz tell me what will be the process to resolve this problem. The error is  KERNEL_SECURIT_FAILURE_CHECK Plese suggest

  • Why can't I make a Youtube Account??

    I'm trying to make a Youtube account. But every time when i have to verify my Email account it keeps on saying " Microsoft account is unavailable from this site, so you can't sign in or sign up. The site may be experiencing a problem. You can sign in

  • "Contacting the server for information. Press ESC to cancel." in Excel when opening

    I havea user that when she open an Excel file that is older format 97-2003 it just says "Contacting the server for information. Press ESC to cancel." in the status bar then it hangs.  If she press esc about 20 times she get to see the document but th

  • Synchronizing motion for two layers

    Ok. I'm more than a little frustrated trying to get this to work. Any help would be most appreciated. I've got two clips. One is a still image serving as my background. the other is an illustration of a man standing stationary in the foreground. The