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?:(

Similar Messages

  • Problems with image scaling

    I'm facing a real problem with image scaling
    I've used several algorithms but it all has defects but the most common thing is the out of memory error after several enlargments...
    does any one know a solution...
    note:
    I've used several packages to do so,but I'm looking for a solution from the jdk itself
    JAlexscorpio

    Did you take into account that the getScaledInstance() -method creates a completly new Image?
    So if you use it like in
    ImageIcon icon1=new ImageIcon("Blah.gif");
    ImageIcon icon2=new ImageIcon(icon1.getImage().getScaledInstance(400,400,SCALE_FAST);
    you will end up with 2 different Images which have their own data and memory requirements.
    even if you use something like
    ImageIcon icon1=new ImageIcon("Blah.gif");
    Image i=icon1.getImage();
    icon1.setImage(i.getScaledInstance(200,200,SCALE_FAST));
    You will need enough memory to store the data for the original image, as well as the data for the scaled
    version of the image, at least for the time that it take the JRE to create the scaled version. You never know when the garbage collector kicks in to delete you old data so it could be that this takes some time and until
    that moment your memory is not available. If your now doing several of the scaling operations, and there is no chance for the garbage collector to do its work, you will run out of memory.
    I hope that might help, if not feel free to post again

  • Strange problem with image scaling when placed

    I'm currently running InDesign CS6 from the Creative Cloud, and it's version 8.0. I have a PC and am running Windows 8.
    I am experiencing a really odd problem when placing images, and it only recently (within the last two weeks perhaps?) has developed. I do ebook production for a publisher. I have an InDesign template (INDD file really, but "blank" and ready to be filled in, and as such I refer to it as a "template") that I use, and the cover for the book goes on the first page. The document is set to pixels as the ruler measurement, and the pages are 650 pixels wide by 800 pixels tall. The margins are all set at zero. The cover images are sent to me as JPEGs and always have the same size: 72dpi setting and 500 pixels wide by 750 pixels tall. This is chosen to be about the size of the full screen on most ereaders, or close enough to be so.
    So when working on a new book, I put my cursor in the blank line that is set up to take the cover as an inline image. I do control-D to place, select the file, and hit enter. This SHOULD place an image at that location that is 500 pixels wide and 750 pixels tall when looking at the InDesign page rulers. Instead, InDesign insists on placing this image at 50% scaling, so that it is only 250 pixels wide by 375 pixels tall. And in the link info panel, it shows the actual PPI as 72 and the effective PPI as 144. It does this no matter how many preference changes I try (including the ones under file handling and the import setting options).
    The strangest part is that if the file is just a tiny bit different than 500x750 @72dpi, then there is no problem. For example, if I open the JPEG in Photoshop and change the image settings to 500x750 @73dpi, then InDesign places it at 100% scale like I want. If I change the image to 499x749 @72dpi it also gets placed in InDesign at 100% scaling. I've tried this with various new INDD documents with settings in pixels, inches, or picas as the ruler amounts, and with different page or margin sizes (just in case the problem is with my template). I get the same result no matter what.
    It appears that InDesign somehow thinks that any image that is exactly 500x750 @72dpi should be scaled at 50% when placing it into an InDesign file. Has anyone else run across this? Is it a bug or something I'm doing wrong? I've been doing this exact procedure for over a year, first with CS5 and now CS6, and I've never had this happen until just recently. I suppose it COULD be an accidental change in settings or preferences. But if it is, I cannot figure out how to change it back.
    UPDATE: I installed the 8.0.1 update and it did not resolve the issue. I also tried more image options. It looks like this scaling to 50% upon placing ONLY happens when all three attributes match this: 500x750@72dpi. All of the following modifications to the exact same image placed in the exact same spot in the exact same document resolved the issue:
    501x750@72dpi
    499x750@72dpi
    500x751@72dpi
    500x749@72dpi
    500x750@71dpi
    500x750@73dpi
    But of course, I don't want to have to modify every cover image I'm sent in order to prevent this scaling issue.

    I just tried this and got the same results (CS6, 8.0.1, on WinXP SP3). One other tidbit: the same 500px × 750 px @ 72ppi image saved as TIFF instead of JPEG worked correctly (at least for me). I haven't tried any other image formats yet.
    This sounds like a good candidate for an official bug report: http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    -Bill

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

  • Problem with image scaling

    I'm currently writing a flex application where I'm scaling
    images on a hidden canvas, and then taking a bitmap of them and
    drawing that bitmap to a visible component. There are two reasons
    for this: so that the user doesn't see a mixture of scaled and
    unscaled images, and so that I can do some operations on the
    bitmap, saving the processing time of altering all of the objects.
    The problem is that the scaling doesn't seem to have finished
    by the time I create the bitmap. Is there a way that I can be sure
    the operation has finished first? Or is there a better way I should
    be going about this?

    Although I didn't see an event for scaleX and scaleY, width
    and height do have an associated event (ResizeEvent), so I decided
    to use them for my scaling. I set up an event listener, and counted
    the events that had been fired, until they had been fired for each
    of the items that was to be scaled.
    I checked to see whether it worked, and it seemed not to
    have. In fact, it seems to have given me the same result as I had
    without the event listener, so as far as I can tell, the event is
    being called at the beginning of the resize rather than when it is
    completed.
    The problem isn't due to bad placement or sizing logic, as
    I've tested making the buffer visible, and it responds as expected,
    albeit with the resize flicker that I'm trying to eliminate. I am
    also certain that the draw is being triggered in the event
    listener, and have tested to make sure that there are no further
    resize events that I am not handling.
    I'm honestly kind of baffled. How can I resize multiple
    interconnected pieces of content without a separation being visible
    to the user in the intervening frames?
    Edit: I was able to tell when the image loaded by attaching a
    listener to the image that listened for the update event. I may be
    coming at this from the wrong angle, though, so I'm going to look
    into other ways to solve this problem as a whole.

  • Problems with image field and java

    Hi, i´m a beginner user of Adobe LiveCycle Designer, i create a form and i fill the text fields with a Java code, but when i try to dinamically assign a image on the image field of my form it doesn´t work, someone have any idea of whats happening or how can i manipulate the image field from Java code? thanks

    Session data will only last as long as the servlet container allows. In most cases (eg Tomcat) this defaults to about 30 minutes, but can be changed. Check that the session timeout configuration in your servlet container hasn't been set to "never timeout".
    Even if it had, I would have expected OutOfMemory errors rather than degrading performance. Although if the max heap size of the JVM has been set to a level higher than the RAM on the machine you could be getting excess page file usage.
    This probably wouldn't put CPU utilization at 99% though.. I suspect this is a code related problem.
    My best guess is one of two reasons:
    1. Somewhere in your code, or someone elses, there is a loop that never ends.
    2. There is a bug in the servlet container.
    I don't know which servlet container you are using, but I have used Tomcat extensively and never seen this behaviour.
    In terms of solving this problem, that's a tough one. I would try running the entire application within a profiling tool to see which threads are clogging up the processor. The Eclipse java IDE has a plugin called Eclipse Profiler which will allow you to track the utilization of code right down to the method level.
    If it were me, I'd be running the entire web application with a profiler like Eclipse Profiler and waiting for it to start clogging, then see who the guilty code is.

  • Having a problem with image IO and drawing image

    My question did not come out on the other posting. I am getting them image from a JPanel. I then convert the image into a renderedimage. Use the ImageIO.write method to convert to png format. I don't want to save the image on the local disk so it is writted to a ByteArrayOutputStream. I get the bytes from this and insert this into a blob field type.
    Then to paint the image onto the JPanel I try two methods to paint it on to the JPanel. I set the JPanel to be the width and size of the image. But I am getting a null pointer exception and I can't figure out why. If anyone could give me any suggestions I would really appreciate it.
    rImage = convertToRenderedImage(draw.drawPanel.offScreen, width11, drawPanelHeight, type);
    try{
    bo = new ByteArrayOutputStream();
    ImageIO.write(rImage, "png", bo);
    imageBytes = bo.toByteArray();
    }catch(IOException iox3)
    System.err.println(iox3);
    PreparedStatement statement12 = connection.prepareStatement(
    "INSERT INTO feed VALUES(?,?,?,?,?,?);");
    statement12.setBytes(2, imageBytes);
    icon = new ImageIcon(rs.getBytes("file"));
    image = icon.getImage();
    //base is the JPanel
    Graphics g2d = base.getGraphics();
    bytes = rs.getBytes("file");
    bInput = new ByteArrayInputStream(bytes);
    try
    bImage = ImageIO.read(bInput);
    catch(IOException e21)
    System.out.println("Error in imageIO transformation");
    //image is Image and bimage is bufferedimage
    image = bImage;
    Graphics g2d = base.getGraphics();
    g2d.drawImage(image, 0, 0, base);
    g2d.drawImage(image, 0, 0, base);

    Would it be possible for you to send out a small runnable testcase that I could try out with?
    Thanks,
    Kannan

  • InDesign Transparency Effects - Problems with Image Quality and File Size

    Hello,
    We are experiencing new problems exporting InDesign files to PDF.
    To summarize, though our largest workflow is to create files for offset printing, we also deliver our work to PDF for mounting on a website so our clients can download directly from the web. Our new problem is Transparency Effects, and creating a PDF that will both have a high quality (or resolution), and be a small file size.
    We are working with multiple page documents (24 to 48 pages), and would very much like to work with InDesign Transparency Effects. However, after spending much time testing a variety of PDF types, we are finding there is a radical difference between quality and file size. I was curious if anyone has had these problems, and if there is a simple answer. InDesign is an incredible program that allows us to design on the fly with Transparency Effects, but, if we are going to experience these problems, we will have to eliminate these wonderful tools.
    Can you help me or lead me to information online that will help.
    Thank you,
    Lain

    Please don't post in multiple forums. Your question has nothing to do with the PDF language and specifications, but rather PDF workflow or InDesign. I've responded to your other posting and am closing this thread.
    - Dov

  • Problem with fan, temperature and battery after the restore from the stop (Macbook pro 15)

    From a couple of weeks my macbook pro (15" 2.4 Ghz i7 4gb OS X 10.7.4) has this problem: when i close the screen it goes to stop and when i open it goes out the stop normaly but the fan and the temperature increase and the battery last nothing. So i reboot the mac and everithings go to normal way and also battery time increase in comparison with before...

    I've found that samsung kies wifi started at the login and that the app used 91% of my cpu and filled up my ram so i went to: system preference > users and groups > login's elements > and i deleted the app from the list.

  • 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 890fxa-gd70 and temps (what the heck is going on?)

    System Spec:
    Antec Nine-hundred
    890FXA-GD70 bios 1.6
    AMD 6x 1055t @ 3.5ghz (but prob happened even at stock speeds)
    Corsair H50 - (push : shroud : radiator : pull ) 26c / 42c (maybe???)
    2x 4gb G.Skill Ripjaw DDR3 1600
    2x Seagate Momentus XT in RAID0
    BFG GTX275oc
    Muskin 550w PSU
    The digital temp readout on the mobo says one temp, and various monitoring programs say different temps (when they say anything at all...)
    Is this a known bug?  I've had time when Core Temp said my cpu was running at 12c.  Do I have a defective temp sensor on the mobo, or CPU?
    Any help would be appreciated.
    Thanks,
    Glendor...

    And the REALLY wierd part is that the problem just went away over the weekend...  Go Figure!
    Didn't do anything, didn't change anything, just logged into the monitoring apps to write down some settings and noticed the Temps are registering, and show a remarkable similarity.  The only one that is still slightly wierd is the TMPIN2 that still shows a 63-65c reading.  Wish I knew what that was...

  • Problem with pdf export and setting of the paper size

    Hi,
    I develop plugins for InDesign server.
    Can anybody suggest me an way to exports a pdf/ps file from a indesign document with my custom adjustment of the output "paper" size?
    I tried with kPrintActionCmdBoss but the "SavePDFAs" popups although I set kSuppressEverything(!?)
    When I used kPDFExportCmdBoss I cannot set paper size.
    greetings

    The helper class using IText:
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
    public class PDFHealer
       public static InputStream heal(InputStream in) throws DocumentException, IOException
          try
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             PdfReader reader = new PdfReader(in);
             // we retrieve the total number of pages
             int n = reader.getNumberOfPages();
             // step 1: creation of a document-object
             Document document = new Document();
             // step 2: we create a writer that listens to the document
             PdfWriter writer = PdfWriter.getInstance(document, out);
             // step 3: we open the document
             document.open();
             // step 4: we add content
             PdfContentByte cb = writer.getDirectContent();
             int i = 0;
             while( i < n )
                document.newPage();
                i++;
                PdfImportedPage page1 = writer.getImportedPage(reader, i);
                cb.addTemplate(page1, 0, 0);
             // step 5: we close the document
             document.close();
             ByteArrayInputStream ret = new ByteArrayInputStream(out.toByteArray());
             out.close();
             return ret;
          finally
             in.close();

  • Experiencing problem with image display in LR5

    I have an intermittent problem with images displaying and exporting in LR. It just began a couple of months ago and is totally random - will do it with RAW (CR2) or JPG. It displays this way in all modules - Library, Develop, Slideshow....The image displays fine in a non-Adobe image viewer (Faststone or Windows Viewer). I've reloaded LR5 and PSCC and is still persists. I know the image file is fine. It also has begun effecting older images that were showing up just fine a while ago. I just loaded about 200 images and maybe 3 or so have this viewing problem in LR & PS. Has anyone else experienced it and have a suggested fix? My graphics card has the latest drivers and shows no problems with other applications. Here is the same image - one a jpg export from Lighroom, the other a save as jpg from Faststone. HELP!

    This is almost always a hardware problem, causing corruption of the file. The difference you see between Lightroom and other software is that Lightroom is accessing the full RAW image, while the other software is trying to read the embedded JPG preview.
    To figure out exactly what hardware is the problem, you need to try different transmission paths and hardware ... different camera cards, different card readers or USB cables/USB ports, different hard disks, etc. Eventually you should be able to isolate the problem.

  • Problems with Mail, Safari and iTunes after updating to 10.5.6

    Hi all,
    after installing 10.5.6 I have problems with Mail, Safari and iTunes.
    The time to open mails, websides and iTunes store is increasing dramatically since the update. If I open a webside parallel with Safari and Firefox, Safari needs minimum 15 times longer to open the complete side. Mails containing HTML-code also needs a long time to be opened. Tha same Problem with iTunes store. Connecting to the Store costs at least 30 - 40 seconds. And unfortunately for every iTunes store side I open. Its terrible
    Any idea or workaroung to solve that problem?
    Regards
    Michael

    First, run Disk Utility and repair permissions and then restart.
    I installed the 10.5.6 Combo update. Sometimes things get "lost in the translation" when you use Software Update depending on your installation. Perhaps you can download 10.5.6 Combo from the website and install it from your desktop.

  • Problem with outgoing email and 1.0.1

    Outgoing email seems slower, especially with SSL enabled. I am configured with IMAP to exchange, BUT use smtp.dslextreme.com for outgoing. The email will send out but it will take over a minute. I did not have this problem with 1.0 and I had the same configuration with 1.0.

    Well, i decided to use my gmail account for my outgoing smtp configuration and that works great, and with ssl. So i am going to say my problem is with dslextreme and use google for outgoing now. Thanks Apple, this phone kicks ***.

Maybe you are looking for

  • Passing a large string in URL

    Hi The scenario is as follows There are two servers A and B on different locations. From Server A i want to send a request to a url on server B. The request contains a string parameter of very large value (more than 255 characters). The problem is th

  • Collecting images from imovie/idvd project

    Though now I know I should have collected all images in a folder before using in imovie project, is there any way to collect them back from the project now. I wanted to put all images used on a disc for my records.... thanks for any suggestions.

  • Add page number in footer through VBA

    Hi Everyone, First post so be gentle with me. I have inherited an Excel app which creates a pdf file, and I have been asked to add page numbers to the pdf. So I am hoping I can do this from VBA. So far I have found this way to access the pdf doc from

  • Rendering causes pixelation...

    While working on my project, I was importing footage and it constantly came out to the dark green render bar. I believe my footage and the Easy Setup matched so I wasn't sure why it happened but either way, when I render it or just export it out, my

  • Why is the download logic only 32bit?

    Is there a way to make it 64?