Image dpi in AS3

Hi,
I need to calculate resolution of an uploaded image in Flash/AS3. Any idea how I can do that?

why?  do you need the spatial resolution?  do know the color depth of the image?

Similar Messages

  • HOW TO SET IMAGE DPI

    I read images which are 300 DPI . I get it in BufferedReader, and do some pixel manipulation. When I save those pics as PNG or JPEG the image DPI becomes 72 DPI. There should be a way to set image DPI when converting from Bufferedeader to .pgn or .jpg file.

    I need to know how to set DPI to 400 without destroying the image data or pixel height and width. I know of two places within the header of a jpeg that this can be set a third I can see through debug information in metadata but cannot set. Why is this so difficult to manipulate?

  • What is image dpi after "Reduce Image File Size"

    Does anyone know the resulting image dpi after using the "Reduce Image File Size" command in pages? My mother is trying to prepare some things for pre-press, and can't send her document to the printing press, because the pages docs are friggin huge! I'm trying to give her the easiest option for resizing all of the many images in the document, but don't know if this is a viable option if the end product needs to be printed. I need the output to be at least 300dpi.

    As fruhulda wrote, asking Pages to apply changes to the pictures isn't the good path.
    In fact, it's a perfect way to get a fat file.
    My practice is :
    Prepare the document in Pages to define the wanted size of every embedded pictures.
    Edit the picture files in a tool dedicated to this task so that the resulting files will be 300 dpis ones for the wanted sizes.
    Then, replace the original pictures by the definitive ones.
    In most cases, the file will be lighter than the original one and you will have the 300 dpis resolution (except if you apply shadows but it's an other story).
    Yvan KOENIG (VALLAURIS, France) lundi 20 décembre 2010 19:36:56

  • Setting image dpi size of tiff Image

    Can anyone suggest me a method for setting the size of tiff image to 300 dpi.
    I got the following code
    http://markmail.org/download.xqy?id=lljtrh4jtsowwlok&number=1
    But the image dpi size remains the same after this
    Edited by: Priya on Dec 29, 2008 10:58 AM

    Why do you think the dpi remains the same after using the code in the link?
    Any given printer dosen't necessarily have to honor the dpi setting in an image format. In fact, usually the image viewer used to print the image takes control of the physical size of the image.

  • How to change Tiff  image DPI

    Ho Guys,
    I am looking for a code example to change Tiff Image DPI from 200 to 300.
    Any suggestion is greatly appreciated.

    You need to look for algorithms on scaling images. On such example is here:
    http://www.rgagnon.com/javadetails/java-0243.html

  • Image dpi

    Hi
    I use Jdeveloper 11.1.1.3.0
    I use an InputFile component to upload image. when i upload image, i want to get image dpi. the image format can be anythings (jpg, tif, ...)
    how can i get it?
    Edited by: Habib.Eslami on Oct 14, 2012 12:03 AM

    Hi,
    there are different solutions:
    http://stackoverflow.com/questions/7142568/how-to-get-the-dpi-of-an-imagejava

  • ID5.5 image dpi cut from 300 to 150 in save as ps, acrobat to pdf

    When I submitted book interior to printer, they said some images were 150 dpi. I checked the ID file links, and they showed them as 300 dpi. My process to pdf was: from ID, save as postscript file, then use Acrobat Pro with the PDFx1a2001 profile to create the pdf. Any thoughts on where in this process the images would be downgraded to 150 dpi? Here is the file as ID shows it:
    Thanks for any suggestions.

    Not really.
    http://www1.lightningsource.com/ops/files/pod/LSI_FileCreationGuide.pdf
    Take care, Mike

  • How to read the contents of images folder using AS3

    Hi,
    I'd like to load the images in the folder dynamically without using XML.
    Is there a mechanism in AS3 that enables me to read directly the content of images folder directly without using XML or should I use php to do that?
    Thanks

    Yes you can do that without XML. You need to use the Loader() class to dynamically load the images. Check the documentation of the loader class.

  • PDF Generator ES: Monochrome image DPI

    Has anybody had any issues with DPI settings being overridden in output from PDF Generator ES?
    We're passing 200dpi TIFF files in, and getting out PDF files with a DPI of 72 (tested by exporting to TIFF from the PDF) but containing the same number of pixels. The result is the page size is about 2.78 times as large as the original TIFF image.
    Right-click conversion to PDF using Acrobat on the server produces a file with the correct DPI (and therefore page size).
    I did look through the exported PDFG config files, and noticed this:
    > /MonoImageResolution 72
    But this seems to be a base operand for other settings (e.g. thresholds for mono image conversions) and changing to 200 seems to have no effect. Have reverted back to defaults now.
    Converting the TIFF into a PS file then passing that to PDFG gives the correct DPI/page size. Also the same TIFF files come out correctly on PDFG 7.2.
    Putting together a case for Adobe, but asking here in case anyone else has come across this.
    Thanks in advance for all input on the matter!

    I've raised the issue with Adobe and been told that a fix is on the way. If you encounter this same problem and you have a support and maintenance agreement, contact Enterprise Support and they will be able to assist.

  • Need to get rid of persistent images created with as3 - pls help

    I have used the following as3 code, courtesy of Jody Hall at theflashconnection.com .  It's a drag and drop that works great. Problem is the drag and drop images persist when I move on to other frames. How do I clear the images when finished so they don't appear in subsequent frames? Thank you in advance.
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    var sndExplode:explode_sound;
    var sndExplodeChannel:SoundChannel;
    var dragArray:Array = [host1, agent1, physical1, social1, host2, agent2, physical2, social2, host3, agent3, physical3, social3];
    var matchArray:Array = [targethost1, targetagent1, targetphysical1, targetsocial1, targethost2, targetagent2, targetphysical2, targetsocial2, targethost3, targetagent3, targetphysical3, targetsocial3];
    var currentClip:MovieClip;
    var startX:Number;
    var startY:Number;
    for(var i:int = 0; i < dragArray.length; i++) {
        dragArray[i].buttonMode = true;
        dragArray[i].addEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
        matchArray[i].alpha = 0.2;
    function item_onMouseDown(event:MouseEvent):void {
        currentClip = MovieClip(event.currentTarget);
        startX = currentClip.x;
        startY = currentClip.y;
        addChild(currentClip); //bring to the front
        currentClip.startDrag();
        stage.addEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
    function stage_onMouseUp(event:MouseEvent):void {
        stage.removeEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
        currentClip.stopDrag();
        var index:int = dragArray.indexOf(currentClip);
        var matchClip:MovieClip = MovieClip(matchArray[index]);
        if(matchClip.hitTestPoint(currentClip.x, currentClip.y, true)) {
            //a match was made! position the clip on the matching clip:
            currentClip.x = matchClip.x;
            currentClip.y = matchClip.y;
            //make it not draggable anymore:
            currentClip.removeEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
            currentClip.buttonMode = false;
            sndExplode=new explode_sound();
            sndExplodeChannel=sndExplode.play();
        } else {
            //match was not made, so send the clip back where it started:
            currentClip.x = startX;
            currentClip.y = startY;
    DRAG AND DROP (I JUST DID THE LAST FOUR FOR THIS EXAMPLE)
    MOVING ON TO NEXT FRAME, YOU STILL SEE THE RECTANGLES.

    Thank you SO muchNed Murphy
    I'm a newbie to AS3 and I was trying to figure it out for past 2 weeks that why did swapChildren or setChildIndex or addChild, all of these made my Target Movieclip remain/duplicate/persist on the stage even after the layer containing the Target Movieclip has blank keyframes. I surfed so many forums and tutorials for the answer but turns out it was my lack of knowledge of basic concepts. I remember checking out this specific forum as well past week but due to it being "Not Answered" I skipped it. This should be marked as a "Correct Answer", The Empty MovieClip did the trick!
    I needed this solution for a Drag and Drop game, so that the current item that is being dragged is above all other graphic layers. And when all items are dropped on their correct targets, there is gotoAndPlay to Success frame label.
    I created a movieclip on the top layer with the same dimensions as the stage and put it at x=0 y=0 position. Instance name: emptymc
    And deleted the emptymc from the timeline during the Success frame label.
    Here is some code I used,
    1. MovieClip.prototype.bringToFront = function():void {
       emptymc.addChild(this);
    2.  function startDragging(event:MouseEvent):void {
      event.currentTarget.startDrag();
      event.currentTarget.bringToFront();
    I didn't know how to put the addChild and refer to the currentTarget in the startDragging function itself, for example
    emptymc.addChild(event.currentTarget);
    - This one didn't work inside the startDragging function "emptymc.addChild(this); "
    Is there a correct way I could have done it properly?
    Thanks,
    Dipak.

  • Image DPI and resolution

    Hi all,
    I need to set the resolusion and dpi of an image with text,
    because i need to print it in a A4 and it has to be with high quality.
    Thanks!

    [Double-posted|http://forum.java.sun.com/thread.jspa?threadID=5311597&tstart=0].
    ~

  • How to access Image Metadata with AS3?

    An image, like a jpeg, has a bunch of metadata stored in it.
    The "IPTC Core" metadata usually includes the photographers name,
    address, title, description, etc.
    Is there any way to access this information using AS3 so
    that, say, captions for images in a flash gallery could be
    generated automatically?

    As far as I know this is not possible with AS3 directly, but
    if you are interested you could check out the as3corelib at
    http://code.google.com/p/as3corelib/
    They have some pretty nifty JPEG things going on there
    (although I do not know if this includes metadata - but I hope
    so).

  • How to keep image dpi at 300dpi

    I am trying to print a photo for framing but when I mess around with the colours the quality seems to diminish this is on my iPad quastion is ? Is it possible to drastically change colours and maintain high dpi.  For large printing around 60 cm sq please help

    It depends on the image. Best way for us to advise you is to open your image, then go to Image > Image Size and upload a screen capture of the Image Size box with the readings.
    What you might have working against you is not enough pixels. Upsampling may just make it blurred. But we will see.
    300 ppi is also not carved in stone, you may get away with 200 ppi depending on where you are sending it for printing.
    And lastly, if you are paying a commercial printer to do this, it's best to consult with them and see what they can do.

  • Preview.app ignores "Image DPI" when scaling

    In 10.4 Tiger, Preview.app did the right thing and would print images according to what would be their correct and natural size. For instance, if I scanned a document at 200dpi, and it was 934px wide, Preview.app would print it to paper so that it was 4.67in wide. This is correct behavior.
    It knows that the JPG I'm printing is 200dpi because that information is in the JFIF block. You can see this by hitting Cmd-I when viewing a .JPG and looking at the JFIF information.
    10.3 was broken in this manner, it would just try to print as many pixels as it could on the printer, or scale it to take up the size of the whole page.
    Apparently 10.5 Leopard does the same thing as 10.3--it won't print a document the right size. When I choose Scale: 100% the print size is much bigger than 8.5x11 when it should fit in 4.67in. The other options are scale to the size of the page.
    Is there something I'm missing? Is this a regression?
    Thanks!

    I was missing something. When I filed a bug, I got a response that asked:
    +Do you have the Preview Image preference entitled “Respect image and screen DPI for scale” checked on or off and does either way make a difference to your workflow?+
    The result is that when this is chosen, the scanned DPI is respected not only on the screen but also for the printed output. This is what I expected. Thanks Apple!

  • Set image DPI and Depth BITS

    Hi,
    I've been working in an app that takes images, converts them to a matrix and then back to images. I use jpeg files. I noticed that an image of 1024x768 thats 500Kb size ends up 1024x768 of 102Kb size.
    I checked the images and noticed that for an unknown reason my app take imges of, lets say 300dpi and turns them into 72dpi images.
    I would like to know if there is anyway i can tell my app to store the image with 100dpi. I would also like to know if there is any way i can change its bits depth from 24bits to 8 or 4bits.
    I did some research but i dont know how to use this:
    Package com.sun.image.codec.jpeg
    Ideas?
    Thanks a lot.

    Rodney_McKay wrote:
    SoulTech2012 wrote:
    i'm sorry you're having so much trouble with this concept
    go to Google and type in "image resolution vs. dpi"
    this links seems like a good one:
    http://www.rideau-info.com/photos/mythdpi.html
    I'm sorry you're having so much trouble with the difference between technical terms and the attempt of simple users to explain things in simple words so they can understand.sounds like backpeddling to me
    either way, this is a technical forum, get over it
    statements must be technically accurate lest you send a noob in the wrong direction
    I gave you the definition from a dictionary and an encyclopedia, and you put a link to some unknown site that is intended for simple users of photo editing software.Look, I can't help it if you found some bad definitions.
    But that doesn't change the fact that image resolution has nothing to do with dpi
    Don't believe everything you read in the Internet...exactly!
    DPI is not even a term it's just an acronym of a unit.
    If you right click in a JPEG in Windows OS and select Properties->Summary you will see the Horizontal and Vertical resolution of the JPEG in DPI.for the last time, there is the resolution of the image, and then there is the DPI when rendered to the screen or printed on paper, THEY AREN'T THE SAME THING
    But wait - you will say Microsoft is also wrong.
    I agree that it is confusing this way, but life is hard...it is not confusing to me in the slightest
    look, you can argue for your beliefs all you like, i'm done with this topic
    furthermore, it's been discussed here many times

Maybe you are looking for

  • New sites & pool deployments

    Hi all, We use Lync 2013 Standard with Edge for presence, IM, webconf, pchat only - no EV deployed. I'm about to migrate ourselves onto an Enterprise setup with 2 sites, each one containing 3 FEs in each pool. My question is, can I safely roll out th

  • SourceFire is not updating the data

    I am currently running Virtual Defense Center 64bit, v5.2.0 ( Build 838), Sourcefire Linux OS 5.2 (build 135).  We have the Defense Center and one device ( 3D7010).  The system was working fine until we changed the password on the Shell account on th

  • Using an external hard drive (HD), on a network, as a scratch disc?

    I am weighing my options on creating a wireless network around an external HD. My macbook pro is getting full and I am going to do a spring cleaning and get everything in order. I pretty much know how I want to do it but I am wondering if I can use a

  • How to recover a deleted document library webpart with files in it?

    Hi,  I accidentally deleted a document library webpart with folders and files in it. Can someone help how to recover it? What do you think happens to the files? I checked the recycle bin, there is no any deleted file related to the missing files. Whe

  • HT3819 to use apple tv, all your info needs to be stored in iclouds?

    How do i get my computers to be listed if home sharing is turned on and it still does not show on Apple TV?