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

Similar Messages

  • VI Method "Front Panel:Get Image Scaled" Memory Error 17

    Hi all, I've got two almost identical sub vi front panels that I'm dumping to a jpg image for reporting purposes.  One was copied and slightly modified from the other to show a different data set and plot.  The original works just fine, but the second sub vi, when using the "Front Panel:Get Image Scaled" method to pass the image to write the jpg, always returns the following error:
    "Error 17 occurred at Invoke Node in Myprogram
    Possible reason(s):
    LabVIEW:  Not enough memory to manipulate image.
    =============================
    NI-488:  Unrecognized command.
    Method Name: Front Panel:Get Image Scaled
    [Continue] [Stop]  "
    I've stripped the problem section into a simple tiny new that only opens the report and tries to get the image with the same working/non-working result above.  Using the Execution Trace Highlighter, it error is definitely occuring when the Method executes.
    Any ideas?  Thanks.

    Hey cjgpr,
        I haven't been able to dig up much info on this error message.  There's one other discussion forum post that talked about it some, and a KnowledgeBase article on it.  It seems that whatever changes you made to the front panel have caused it to exceed your computer's memory when creating an image.  Try removing items until it works, then see what actually breaks the functionality.
    Brian B
    Field Sales Engineer
    Tennessee/Southern Kentucky
    National Instruments

  • Error 53 : BD.Get Image Scaled

    Hi,
    I used invoke node(method block diagram:get image scaled) to get a screenshot of block diagram of a VI. It works well in LabView 8.6. But with the application built based on the VI, I got a 53 error code. Any suggestion?

    >>"Built" as in built into an .exe file?
    >>
    >>If
    so, you can't get an image of the block diagram because the block
    diagram is removed from the VI's when they are built into the
    executable.  The only thing present is any needed front panels, and the
    underlying compiled code that is built from the block diagram.
    >>
    >>For what reason do you want to capture an image of the block diagram?
    1. Yes, it is a .exx file.
    2. The application is used to generate screenshot of a user specified VI, not a VI built into the executable.

  • Getting the page size and knowing how many pages they are in PDF file

    Hi There,
    when i do this script (
    var myPDFFile = File.openDialog(["Choose a PDF File"]); ) 
    with JS via Windows it is used for opening a new PDF file when i import this file i need to
    get the page size and how many pages they are in PDF file. but i dont know how to do it.
    please help me.

    Ask here: http://forums.adobe.com/community/indesign/indesign_scripting

  • HT5664 Just bought a new IMAC. Cant get the iPhoto to open even after apparently loading the library upgraded. Ideas?

    Just bought a new IMAC. Cant get the iPhoto to open even after apparently loading the library upgraded. Ideas?

    Did you install and RUN the iPhoto Library Upgrader on your library?
    OT

  • Getting file header size and image size

    Hi all,
    Now that the AVI file type won't work for me, I have to do some of that functionality myself.
    I can use the function to Get File Size, and the size is returned in bytes, so far so good.
    I figured I could calculate the image size by taking the resolution, multiply X and Y, that gives me the number of pixels.
    Then multiply pixels by bit depth, to get the number of bits, divide by 8 for the number of bytes.
    Since bit depth is 8, the number of bytes will be exact (and the same as the number of pixels).
    When I did the math, and divided by the file size, it didn't come to a round number, and was a larger number than the number of images I could display.
    I figured there is probably additional information stored with each image, but I don't know how to adjust for that.
    There may be byte clustering happening, making each image larger than the actual byte count would indicate.
    And, there is probably file header info, but not sure where to get that.
    I looked through the IMAQ functions, and didn't see one about getting the image size (I did see the one that returns resolution, but I have that data already).
    Any suggestions on how I can calculate how many images are in my binary file?
    And, how to get the byte sizes I need to be able to set the file pointer correctly to get an image out of the middle of the file?
    Thank you for any suggestions,
    Jeff

    If I understand correctly You have binary file with multiple images inside and You want to extract that images?
    Depending on image type You can search by tags where image begins and ends: http://www.impulseadventure.com/photo/jpeg-decoder.html and extract.

  • How to get image using Http and how to save in Smulator

    Hi guys,
    Am working in black berry bold. i dont know how to get image using htp connection and one more thing i need to save this image in side simulator directory............. what are the specific API i should...
    Guide me.........

    If you want the input image size you need to pass it in as parameters.
    A discussion thread on this topic is:
    http://forums.adobe.com/thread/29948
    -- Daniel R. <[email protected]> http://danielr.neophi.com/

  • Two step import, downsizing image file sizes and/or keeping copies?

    hi all,
    leonie was kind enough on another thread to suggest a two step import from the iphone in order to make sure that there is no accidental deletion or data loss. my understanding (i'm repeating it here myself in case i am misunderstanding) is that this routine involves 1. importing images into Aperture via the conventional import method and then 2. backing up to iTunes (to save the images) and 3. verifying (visually i think) that the images are in the Aperture database and then if so allow Aperture to delete all the images from the iPhone.
    this seems to make sense to me but i realized i had a couple of questions about general "photo hygiene" related to this kind of thing.
    1. is there some way to downsize file size after images are imported into Aperture? i take a ton of photos and only some are important to keep at a high resolution and i feel like i am stuck between having a huge Aperture database cluttered with lots of photos at high resolution /or/ turning down the file size and finding that i have an important image that is at a low resolution because i forgot to turn up the file size (i think these are in settings somewhere in my phone) before i took the photo or only realized later that it was important to have this image at higher resolution. if i could downsize while thinking about it in Aperture this seems like it would work.
    2. does anyone keep an external copy of their images outside of the Aperture database?
    thanks

    hi terence,
    thank you.
    so can i ask if anyone is using an iphone and/or what setting(s) and/or resolution folks are using?
    i guess i have a bit of a dilemma in that i take a ton of photos and i only use one at a high resolution while the others can be something as insignificant as a visual note to myself. and it kind of kills me that these could be 1.2 MB in that i have a lot of them. i sort of wish there was a way to downsample imagery since a lot of these are not so important.
    anyway. yeah i guess i was wondering if folks do a referenced library or keep an extra copy as a backup (i guess i am 'embedding' images in the library but i forget what i call this in aperture) - and i have started to wonder if there is some utility to doing a referenced library or keeping a backup but this seems like overkill while at the same time a referenced library would allow me the ability to downsample images from what i can tell but i am just guessing here since i haven't tried this method.
    thanks.

  • Dual library question (iTunes gets the library size and bitrate wrong)

    I have two libraries, one ripped in Lossless, and the other in AAC at 256 kbps. I use one for streaming, and the other for syncing to our iPods. I just switched from the Lossless library to the AAC library (kept on separate drives). iTunes now sees the AAC files, but incorrectly lists all the bitrates as their higher Lossless numbers. However, when I click on an individual song to play it, the bitrate appropriately is recognized as 256 kbps. When I do this, the total library size (listed at the bottom) also incrementally "shrinks."
    The problem is that I just purchased a new 80 GB iPod capable of holding the entire library (nearly 8000 songs@25 kbps, ~60 GB total size). Unfortunately, iTunes still thinks the library is much larger (using the incorrect lossless bitrates to calculate file size). This results in it telling me (erroneously) that the library is too large to sync.
    Is there an easy way to get iTunes to realize the new file sizes? I could obviously double-click on each and every song in the library until iTunes "gets" the real size, but I assume there's a better way. I also assume that this will be an issue every time I switch between the two libraries.
    Help, anyone? Thanks in advance.
    KK
    iMac G5, Mini, PB G4   Mac OS X (10.4.6)  

    Thanks for the tip, but this didn't work, unfortunately. Following your lead a bit further, I even created a new playlist and dragged the whole library there, but the wrong bitrates (and thus, playlist size) still appeared.
    One more curious update regarding this situation. iTunes automatically populated my iPod with what it believed was a subset of my tunes that would fit on the iPod. The real size of this subset was ~20GB, but iTunes thought (using the Lossless size) that it was nearly 60 GB. In categorizing the contents of my iPod, it listed ~60GB of songs, ~1 MB of photos, 1 GB of video and still listed the space available as ~50 GB (for a grand total of ~112 GB of space on my 80 GB iPod). Clearly, iTunes used the calculated size to estimate the music content, but used the actual space remaining based on a query of the iPod drive. Strange, huh?
    I'm still looking for advice--any other suggestions would be welcome.
    KK

  • Database file sometimes gets to zero size and zero file flags

    I have a problem that on my system sometimes single database file gets to a state where it has zero size and zero file flags ( as if set chmod 0 file ).
    My database runs 24/7 and there are multiple agents running at the same time. My database files are backed up and removed from time to time to protect stored data. So I guess that this error could come up when two agents get to backup or recover the database file at the same time. Though, it is hard to find if it is caused by this problem, so I'd like to ask if there is anyone who stumbled on same problem - where one database ends up in state of 0 flags and 0 size.

    Hello, anyone has any tip about this issue?

  • How to view images full size and then import selected ones to macbook

    I want to view my images stored on external drive full size and download selected to MacBook pro

    Use a photo viewer like Preview (this has nothing to do with iPhoto)
    LN

  • Getting exact window size and alignment

    I need to record sequences in a predictable, reproducible
    window so that I can record something later and insert it in an
    existing animationwithout creating an alignment error with adjacent
    slides. I'm documenting a web-based app at 800x600. When I record,
    I put the red rectangle at the browser's upper-left, and move the
    browser's lower-right corner to the correct position. No matter how
    carefully I do this, it isn't accurate down to the pixel.
    Aligning the recording with the app would require two kinds
    of settings:
    - Size of the app: I don't see a way to do this with a
    browser and haven't seen it in other apps. A problem is that I'm
    only recording the viewable frame in the browser, not the whole
    browser window.
    - Defining the window: I'd like to do it as in SnagIt, which
    defines a window as just about any rectangle known to the system or
    app. That way, the recording window has a precise relation to the
    browser window.
    These sizes and positions are all known to the software, but
    are they controllable by users?

    Hi Christopher
    Within Captivate, when you record, you have the option of
    choosing to record the Application or to simply configure a
    recording size. In this case, it sounds like you want the 800 x 600
    size. So here is what you do. Click File > Record/Create >
    New Project...
    On the "New project options" dialog, choose Software
    Simulation and "Custom Size". Then click OK.
    Now you may click the Preset sizes button and choose the 800
    x 600 Full Screen setting. This will set the red recording
    rectangle to exactly 800 x 600 pixels.
    Now for some magick. Click the drop-down where it says
    "Optionally, select a window you'd like to record". Choose the
    browser window. Once you do this, click the button labeled "Snap to
    fit" and the browser should be resized and placed exactly inside
    the red recording area.
    Hopefully this helps a smidge... Rick

  • Getting recv buffer size error even after tuning

    I am on AIX 5.3, IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3...), Coherence 3.1.1/341
    I've set the following parameters as root:
    no -o sb_max=4194304
    no -o udp_recvspace=4194304
    no -o udp_sendspace=65536
    I still get the following error:
    UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 44 packets (65536 bytes)....
    The following commands/responses confirm that the settings are in place:
    $ no -o sb_max
    sb_max = 4194304
    $ no -o udp_recvspace
    udp_recvspace = 4194304
    $ no -o udp_sendspace
    udp_sendspace = 65536
    Why am I still getting the error? Do I need to bounce the machine or is there a different tunable I need to touch?
    Thanks
    Ghanshyam

    Can you try running the attached utility, and send us the output. It will simply try to allocate a variety of socket buffer sizes and report which succeed and which fail. Based on the Coherence log message I expect this program will also fail to allocate a buffer larger then 65536, but it will allow you verify the issue externally from Coherence.
    There was an issue with IBM's 1.4 AIX JVM which would not allow allocation of buffers larger then 1MB. This program should allow you to identify if 1.5 has a similar issue. If so you may wish to contact IBM support regarding obtaining a patch.
    thanks,
    Mark<br><br> <b> Attachment: </b><br>so.java <br> (*To use this attachment you will need to rename 399.bin to so.java after the download is complete.)<br><br> <b> Attachment: </b><br>so.class <br> (*To use this attachment you will need to rename 400.bin to so.class after the download is complete.)

  • Get image properties (width and height)

    Hi there,
    Does anyone know if there is a way that I could get the width and height of an image to be displayed in a JSP.

    Image has methods to get the width & height.

  • IPhotoBook Image File Sizes and Formats

    Morning (it is here in the UK!)
    Similar questions found on the forum - but not exactly what I need.
    Please may I ask for your help on the forum.  I notice 'Old Toad' in particular seems to respond to these types of enquiries!
    I've got an iMac - about four years old - with Mac OS X 10.6 and iPhoto 8.1
    I'm building an iPhotoBook (the Extra Large 13" x 10" Size) of Press Clippings which I'm scanning onto a PC, putting into Photoshop and then transferring to the iMac to create the Photobook.  Doing it this way as my Photoshop license is for my PC, plus my PC is newer. 
    Each of the two or three photobooks will run to possibly 100 pages - unsure what my maximum page count allowed will be.
    I'm scanning at 600 DPI using an A3 Scanner.
    Saving as a TIFF once I've created the layout of each page in Photoshop.
    So I'll end up with a series of pre-built pages for the 13" x 10" book ready to drop into iPhoto Book.
    Looking at my file sizes they're currently anywhere between 38 and 45 MB each.
    Am I going to run into problems uploading these?  Will Photobook be happy with my TIFF files?
    Such a vast project want to get it right before I end up going back over my initial work.
    Thank you in advance.

    Scan to tiff by all means and at a sRGB color profile, but output jpegs. There's nothing to be gained using the tiffs in a book. It's converted to pdf when uploading anyway. Most importing thing, preview the pdf before uploading. That's what your book will look like when finished.

Maybe you are looking for

  • Maximum PDF file size for browsers to cache?

    My site distributes daily newsletters via PDF that are typically about 2MB in size. A link is provided to the PDF, and when clicked, it opens the Adobe Reader plugin within the browser (Firefox, IE) and opens the file therein. Recently it was brought

  • Unable to export: an internal error has occurred

    Hi, everybody, Just when I was trying to convince myself that I should NOT go back to LR2, no matter how ugly the new import interface is, I tried my first export and this is all I get: - ping - UNABLE TO EXPORT: AN INTERNAL ERROR HAS OCCURRED ?:0 AT

  • To shrink the size of TEMP tablespace

    Dear all, There is a databse with RAC, now in OEM the size of TEMP tablespace has been reached at 99.9%. now we want to shrink the size of TEMP tablespace. how to we do that??????? plz help me...........

  • Sizing for Workflow

    Hello Gurus, I need information for sizing workflow for a customer who need activate a financial document workflow with a document attachment? This customer create 5.000 FI/Documents daily and each document with one attach. Regards, Carlos

  • IOS 7.1 and APPLE Music APP

    After the ios 7.1 update, when going into my Apple Music App and playing songs, when selecting a song the system does not play the song selected....it plays a song that is 3 or four titles ABOVE the selected song.  The location seems to change but wh