Bug : Image Scaling and Centering

I was wondering if this was a bug with flex or if I was doing something totally wrong.
The amount of code in this is extremely low, so , I was guessing that there was nothing wrong from my part.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Image id="myimage" maintainAspectRatio="true"
horizontalCenter="0" verticalCenter="0"
source="@Embed(source='images.jpg')"
scaleContent="true" width="100%" height="100%"/>
</mx:Application>
This is all the code there is in this application .
My expectation from this code is that the image should fit the screen, maintain the aspect ratio of the image and finally be both centered horizontally and vertically!
Can someone help me out in this ?

Hi,
Also set verticalAlign="middle" horizontalAlign="center" for the Image control

Similar Messages

  • Bugs in scaling and alignment in Illustrator CS5

    Hi
    Am experiencing weird problems with Illustrator cs5 on osx 10.6.8:
    Scaling - for some reason the image get distorted after scaling. see example:
    Each time I scale it'll do it differently. this time it made the right side thicker.
    Any idea why is that?
    Alignment - the bounding box has offset and when aligning it doesn't align the objects right:
    Any idea what I need to do to fix this?

    Select a new document profile that has it turned off or create your own new document profile.

  • PS Newb needs help with image scaling and multi-sheet printout

    Hi, I'm trying to use PS CS3 to scale up an image I have so I can print it out to use as a map for a miniatures game.  I have no problem scaling the image to the appropriate size, but I can't figure out how to print out the image on multiple 8.5 x 11 sheets.  I had thought I'd seen an option for such a procedure previously, but maybe it was in another editing program.  If anyone has any ideas on how I might accomplish this I'd really appreciate hearing about them.  Thanks!

    Illustrator and InDesign do tiled printing as does CorelDraw. Photoshop as such does not, but some script for that may exist. In your case, the simplest solution would be to save the File as a PDF and have Acrobat generate a tiled print (Page Scaling setting in teh Acro print dialog). You just need to make sure your page properly fits multiple pages. Unliek AI and ID, Acro can only chop up stuff based on standard paper sizes...
    Mylenium

  • Problem with image scaling and aligning to the MC bounds

    HI
    I have problem with my custom class.
    For example if image is loaded into the
    holder_mc inside of
    loader_mc, and if the loaded image is bigger than the
    loader_mc, then I want it to scale it down to match
    loader_mc bounds.
    It is something similar to Loader class...
    I've copied this code outside of Loader.as file and modifyed
    it, but its not working...
    I'd realy appreciate that if you could find any mistake or
    any code similar to this...
    Thanks in advance and sorry for my bad english...
    mloncaric

    Anyone please?:(

  • Scaling and centering objects.

    Hi,
    I have a center window and a background in my flash file. I am trying to get the center window to stay in the center of the web browser screen and get the background to expand and fill the entire web browser screen below center window layer. Sort of like this site http://smlsd.com.
    I've currently converted the background to a movie clip and have this code.
    background_mc.width = stage.stageWidth;
    background_mc.height = stage.stageWidth;
    However, the background is not resizing to fill the screen,
    In publishing settings, I have dimensions to "Match Movie", Window mode in "Window", HTML alignment "Default", Scale set to "No Scale" (I don't want the center window to scale and loose proportion. It should have a set size.), and Flash alignment set to both "Center" and "Center".
    I do not know how to get the center window in the center of the screen and have the background automatically resize to fill the whole screen. Can somebody show me some code which would solve this problem and explain it to me? Thanks.

    this works:
    you can view it here http://cybermountainwebservices.com/fullBrowser/FullBrowserAS3.html
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var bmp:Tile = new Tile(35, 35);
    var tile:BitmapData = new BitmapData(35, 35);
    tile.draw(bmp);
    shelter.x = stage.stageWidth /2;
    shelter.y = stage.stageHeight /2;
    function fillBG(evt:Event = null):void {
      graphics.beginBitmapFill(tile);
      graphics.moveTo(0, 0);
      graphics.lineTo(stage.stageWidth, 0);
      graphics.lineTo(stage.stageWidth, stage.stageHeight);
      graphics.lineTo(0, stage.stageHeight);
      graphics.lineTo(0, 0);
      graphics.endFill();
    shelter.x = stage.stageWidth /2;
    shelter.y = stage.stageHeight /2;
    fillBG();
    stage.addEventListener(Event.RESIZE, fillBG);
    in  this case the fill is with a 35pxl x 35pxl gif file but you could just as easily use a color the item called shelter is the name of the jpg in the center.
    when you do this be sure in your publish settings to set dimension to percent 100 x 100  if you cont want a border or scrollbars around the outside be sure to set this css rule in your html   body {margin:0; padding:0; overflow:auto}

  • [svn:fx-trunk] 13263: RadioButton image was incorrectly centered in arcade and zen sample themes .

    Revision: 13263
    Revision: 13263
    Author:   [email protected]
    Date:     2010-01-04 14:07:21 -0800 (Mon, 04 Jan 2010)
    Log Message:
    RadioButton image was incorrectly centered in arcade and zen sample themes. I moved the verticalCenter and left properties to the parent Group to fix this. Also, re-centered the label.
    QE notes: No
    Doc notes: No
    Bugs: SDK-24788
    Reviewer: Deepa
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24788
    Modified Paths:
        flex/sdk/trunk/samples/themes/arcade/src/arcade/skins/RadioButtonSkin.mxml
        flex/sdk/trunk/samples/themes/zen/src/zen/skins/RadioButtonSkin.mxml

  • s:BitmapImage get image scaled size and position after it loaded and scaled

    I am try to know the dimensions of the uploaded image into <s:BitmapImage without success.
    The data coming back to me are isthe real image size and not size after it was scaled to fit the component size.
    I can see that the image scaled down and fit to the maxWidth, but I can't get the actual/real scaled width from the BitmapIMage properties.
    I tried:
    <s:BitmapImage id="mainBitMap"  ready="mainBitMap_readyHandler(event)" complete="bitmapimage1_completeHandler(event)" source="{data.Thumbnail.URL}" maxHeight="250" maxWidth="250" scaleMode="letterbox"/>
      protected function bitmapimage1_completeHandler(event:Event):void{ 
    trace("----------------------Start-----------------------"); 
    trace("mainBitMap.bitmapData.width" + mainBitMap.bitmapData.width); 
    trace("mainBitMap.width" + mainBitMap.width); 
    trace("mainBitMap.measuredWidth" + mainBitMap.measuredWidth); 
    trace("mainBitMap.displayObject.width" + mainBitMap.displayObject.width); 
    trace("mainBitMap.explicitWidth.width" + mainBitMap.explicitWidth); 
    trace("mainBitMap.preliminaryWidth" + mainBitMap.preliminaryWidth); 
    trace("mainBitMap.sourceWidth" + mainBitMap.sourceWidth); 
    trace("-----------------------End------------------------");
    Result:
    ----------------------Start-----------------------
    mainBitMap.bitmapData.width=435
    mainBitMap.width=0
    mainBitMap.measuredWidth=0
    mainBitMap.displayObject.width=0
    mainBitMap.explicitWidth.width=NaN
    mainBitMap.preliminaryWidth=NaN
    mainBitMap.displayObject.preliminaryWidth=435
    -----------------------End------------------------
    Thanks,
    Nimrod.

    Hi,
    I tried the ready event, But I still receive the same results.
    I expect to get the new scaled width And height according to the maxHeight and MaxWidth.
    I see that the image scaled to fi it But I can't recive the new size of it.
    Thanks,
    Nimrod

  • Replacing and retaining scaled and cropped images

    Hi,
    For some reason I can't find how to replace exisisting images that had been tweeked or even images that have not been tweeked in Author. I have several similar images that needs to be scaled and postion in the same area from page to page. I import an image, scale it and cropped it, but once placed I don't know how to replace it with a different image. I tried creating a a template (another problem), but still no go.
    *also, is there a way to create a job without using template? It doesn't seem to allow you it.
    Thanks in advance...AG_779

    You can have a master image on the right hand page in the layout pane,
    and set it to be a media placeholder.(in inspector)
    The image will be same size same spot on each page,
    You can drag an drop to replace the image on each page.
    The problem is, if the new image is a different size (pixels), it will change the size of the place holder frame to match the new image. it will not keep the size of the master image and crop with in that size.
    It is best if you scale and crop each image outside of IBA in Photoshop etc. first,
    then drag and drop on the place hlder for each page.

  • Photoshop preview shows centered image, but shifts image up and right during printing

    I have been using my Epson 3880 for several years; Suddenly, photoshop started shifting my image up and to the left even though the preview box shows the print as centered.  The printer is not the issue because it prints correctly from apple preview and Word.  Operating system MAC 10.6.8...nothing has changed except I replaced a maintenance cartridge on the printer.

    Is this one particular image, or all?  If one image, does it have hidden pixels like a Crop without 'Delete hidden pixels' checked?
    Can you check the date of the printer driver to see if it automatically updated? Can you correlate the problem to another event, like an OSX update?

  • Acrobat X problem with image scaling in Excel

    We are using Acrobat X standard with Excel 2007.
    The problem is that when using the Create PDF button on the Acrobat toolbar within Excel, if the document has been scaled using Page Layout-Scale option within Excel, the resulting PDF has the image the correct size, but it has not been scaled. So the dimensions are correct, but only half of the image will be visible.
    To see what I mean, in Excel, add a picture, then choose Page Layout-Scaling and set to e.g. 50%. Check the print preview to see how it should look, and make sure you have a real printer selected in File-Print (NOT Adobe PDF printer). Then create PDF using the toolbar button. The image in the PDF will be wrong.
    This works fine if using native PDF converter (e.g. Save As PDF file) or by printing to the PDF printer, or by using the CreatePDF button when the Adobe PDF printer is selected as default in the print options.
    This seems to be a bug in X as in 9 it worked fine.
    Is there a solution to this?
    Thanks

    I should add, I updated to 10.1 and it did not resolve the issue.

  • JPEG Image Scaling Speed

    I've got an application where I'm drawing images to the display from a TCP/IP stream. I'm unable to acheive much better than 8 or 9 fps and the real CPU consuming task seems to be the JPEG image scaling. The frames are being scaled by about 2x but the same color depth is retained. I'm running this application on a dual, 1 Ghz PIII with Red Hat 7.1 and JDK 1.3.1. Any suggestions on how to enhance the performance of Java's image scaling would be appreciated.

    You could try using bufferedImages and doing the scaling yourself. I can re-draw a bufferedImage by altering it's raster data
    ie..
    byte [] data = bi.getData().getDataBuffer().getData();
    I get up to 100 fps edditing a 640x480 area. You will have to account for things like bit depth yourself, and scaling algo's, but it might be worth it.
    Also check the Bug database, I believe your problem MAY be related to a bug where scaling always converts the entire image to format -> RGBA -> scaled format.

  • Hello apple guys, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    hello apple guys, after installing OS X Mavericks, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    So is this the way Apple works now? Not solving customers problems? I'm sure so many users have had this problem. I've had, and I reinstalled Mavericks 3 times. Works fine for some days and then several Apple Apps stop working. Is that a way to force us ti update to Yosemite? (I don't want to) and then pay to update some third party programs (i.e. Pro Tools). Also, there are so many 15" MacBooks Pro with graphic problems and of course the guys at the Apple Service Centers always say: "It's the logic board, you can have it replaced, but it's so expensive I would recommend a new Mac".  I really, really miss Steve Jobs!

  • How do I place a transparent image over specific, centered text?

    I'm helping someone with a site that flows sales copy down the center of the browser window. We want to take a transparent oval and place it over a price that will be in the copy. (It would look like someone took a marker and circled the price.)
    I had learned that AP Div could solve this problem and, to an extent, it does. I can place the oval right over the price. But it only works when the copy is left justified, not centered. If the copy is centered, I can place the oval, but if the browser window is resized, the oval stays in place while the copy is reflowed to the new browser window size. Thus the oval is no longer over the correct text.
    Then I learned that Layout Mode might solve this problem, however that has been removed from CS4.
    So now my question is how do I to take a transparent .png file and place it over copy on this site so that if the browser window is resized, the .png file stays with the correct text as the text is "moved" to stay in the center of the brower window?
    I want to avoid the workaround of simply creating a .png with the oval and the price and inserting that in the middle of the copy at the appropriate place. There must be a better way to handle this. Not being too familiar with Dreamweaver, maybe there's some sort of Anchor function similar to one in InDesign that solves this issue.
    I've attached the simple oval .png file we're trying to use for this.
    Thanks in advance for any help.

    How about having the circle underneath the text? I know it's a compromise, but it will be much easier to do as you can assign a background image to the div or table cell which holds the text.
    For example, make a blank graphic and create a class:
    .price
        background-image: url(nocircle.png);
    then assign it to the text and give each text div a unique name
    <div class="price" id="price1">10.99</div>
    then you can turn the background image on and off using Dreamweaver's javascript controls, for example:
    onclick="MM_changeProp('price1','','background-image','url(circle.png)','DIV');"
    Hope that helps.
    Peter

  • Elastic layout and centering

    I have a elastic layout with just one column.
    The main content container has a centered background (which consists of a two vertical colored bands, with the transition in the middle of the page). Padding and margins for body and container are zero.
    The main content container contains two images, side by side, with their joint border right in the middle too (for that I use an ID for the left image to align its right side to the center, for the right image I do the reverse).
    However: when viewing the page, there is an offset between the background center and the image center (just a few pixels), visually very annoying.
    (css and html file included)
    This offset visible is both in Firefox and IE7.
    What do I do wrong?

    just an added note here:
    This past hour I tried to get centering of images, text and background to fit properly in both IE (5,6 and 7) and Firefox.
    Centering with a liquid layout (which I prefer due to its better "said" predictability) is an absolute pain (nothing would seem to fit); I reverted back to elastic layout because of this issue.

  • I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.

    I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week, Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.
    The file name has no special character in it, just letters and no spaces.
    I have done this in the past and it has worked, but now it will not.
    I have not upgraded any software, that I am aware of.
    After scanning, the Image Capture pops up the Scan Results with the file name in the window, but neither the Scan Results nor the Image Capture window responds to inputs.  The Image Capture window is frozen, with only the "Overview" and "Cancel" buttons active (but non-responsive).
    Is this a software issue or a scanner hardware issue?  I am using a HP Photosmart C6200 series printer/scanner on a network using a Time Capsule airport.
    Thanks.

    I had the same problem.
    Got a 90% fix.  Apparently the Mavericks preferences won't work with Yosemite, so I just deleted the Image Capture preferences.
    Unfortunately, the "Scan to" folder seems to be permanently set to the Pictures folder.
    1.  Quit Image Capture
    2.  Go to Finder > Go > Home, which opens up your home folder (named after your user name)
    3.  Open Library > Preferences > com.apple.ImageCapture.plist - Drag this file to the Trash
    4.  Start "Image Capture", click "Details" and change all your settings as you prefer
    5.  Quit and restart "Image Capture".   Notice it remembers all your settings except "Scan to" folder.  It insists on saving to "Pictures".
    That's as far as I was successful.  I tried changing the "Scan to" folder to "Desktop", but on launch, Image Capture always sets it back to "Pictures".
    This is what I tried:
    6.  Download and install "Pref Setter" from http://www.nightproductions.net/prefsetter.html
    7.  Quit "Image Capture".  Right-click on "com.apple.ImageCapture.plist" and open with Pref Setter.
    8.  Search for "Pictures", which finds "~/Pictures" (the tilde character at the start means your home directory).
    9.  Double-click on "~/Pictures" and change it to the folder you prefer.  I like "~/Desktop"
    10. Choose File > Save then Quit from Pref Setter.  Note that re-opening the plist file still shows "~/Desktop"
    11. Start up "Image Capture" -- on startup, "Image Capture" sets "Scan to" folder to "Pictures"
    I consider this a bug.

Maybe you are looking for

  • Time Machine: Make it back up less?

    Ok, I don't know how to do this and the discussion board here isn't giving much insight, but I require to find an answer, because right now using an older machine I get pegged at maximum processor peak whenever Time Machine runs in backup, even if it

  • Video Playback in iTunes (and Quicktime) All White

    Since I updated iTunes and Quicktime, playback of all videos in them is now white, with a few dots of colour and just audio playing through. Is there a solution to this yet? Thanks - Dan.

  • MBA fan comes on all the time no matter what I do

    does this happen to anyone else? Used to be just running videos but now as soon as I open the lid the fan fires up and crushes my battery life...any thoughts?

  • Gap under flash movie in Firefox

    Hi all, A site im developing shows a gap under the flash movie in firefox. http://www.britanniamotors.net/ I dont get the problem using the other method of embedding that i used on http://www.britanniamotors.net/aboutus.html the problem with using th

  • ? left out past name ability in Print dialog "  save as PDF "

    i , like many use the print dialog to save as PDF. In the interest of minimizing steps I would clik on a file, highlight the name, copy it with command C with my left, and hit print, command P with my right. quick track ball over to save as PDF and l