Confusion with Image/BufferedImage

Hello,
I'm trying to write an applet that displays and modifies local image files (gif). I'm running into some confusion with the different image APIs and drawing methods though.
I want to read the files, display them, and then create new images from sections of the original ones. I wrote an applet that succesfully loads and displays files as Image objects, but then I saw that BufferedImage has a method getSubImage() that I thought I could use to create the new images.
But my problem is that even without manipulating the images, I can't get them to display as BufferedImages. Here's the code, where I try to display the series of images twice, once as Image, once as BufferedImage, but the BI come out as black squares.
public class myapplet extends Applet
     BufferedImage[] img = new BufferedImage[NUM_PICS];
     Image[] im = new Image[NUM_PICS];
     public void init()
          Toolkit t = Toolkit.getDefaultToolkit();
          Graphics2D bg;
          MediaTracker tracker = new MediaTracker (this);
          for(int i = 0;i<NUM_PICS;i++)
               try
                    im[i] = t.getImage(gen.getLogo());
//the getLogo method is from a class I wrote -
//it returns a string with a filename
               catch(Exception e)
                    System.out.println("ERROR: "+e.getMessage());
               img[i] = new BufferedImage(70, 70,BufferedImage.TYPE_INT_RGB);
bg = img[i].createGraphics();
bg.drawImage(im[i],0,0,this);
     public void paint(Graphics g)
          Graphics2D g2 = (Graphics2D)g;
          for(int i=0;i<NUM_PICS;i++)
               g.drawImage(im[i],10,i*70,this);
               g2.drawImage(img[i],null,80,i*70);
Any help would be great.

You have to use the MediaTracker before drawing the image onto the BufferedImage:
try {
im[i] = t.getImage(gen.getLogo());
tracker.addImage(im[i], i);
tracker.waitForID(i);

Similar Messages

  • Image/BufferedImage to Video Output

    Hi,
    I'd like to know how to send an Image/BufferedImage to my video card.
    In short, i have a java program that displays image thumbnails.
    When the user clicks on a thumbnail, i would like the fullsize image to be displayed on a television plugged into my computer's S-Video-out port.
    Can anyone tell me how to do this?
    thank you

    You can use just about any tools for the videos...
    The confusing part is that those listed in Lib. mode are sugesting that the dev. mode counterparts arent working.
    While they are...
    You can apply just all the dev. tools to the video. Aside from brushes etc. SplitTone, Saturation, HSL, curves all working.
    Syncing is slow... Do this:
    1)Make your adjustments on a captured JPEG frame. The hit Shift+Command + C...
    2)Exit Dev. Mode and enter Lib. Mode and select your video
    3) Hit shift+command+v to paste the settings.
    Much faster than using the sync mode or saving a preset.
    It beats me why LR4 doesn't just capture an automatic frame of the footage (From whereever the playhead is) and the when we click Dev. mode just edit on that.
    As of now we have to:
    0) In Library Mode
    1) Goto the Frame we need
    2) Click Capture Frame
    3) Select the captured frame
    4) Switch to develop mode and make settings
    5) Exit Develop mode and goto Library mode
    6) Select video clip
    7) Apply settings...
    Even if adobe had strived for it, I dont think they could possible have complicated things any further. They'll get a grammy for this one ;-)
    There is SO MUCH room in the library tab.... For ANY video clip... Just put the dev. settings right there for us to mess with. Why only put a few there
    with crippled controls...
    Why even have TWO MODES... What I hate in Lightroom and always have hated.. Is having to SWITCH from ONE window to the NEXT just to make adjustments with sliders that makes sense
    instead of those crippled ones in Library Mode.
    We have 2012, fast computers and faster minds. Why should we be crippled like this. Makes absolutely no sense.
    Is Lightroom the best software around. IMO = YES.
    But I sure hope that LIghtroom WONT be setting what we will come to know as a bar for standard. So much room for improvement. And there has been since V1.
    Please --- This time.. Make the app easier to get around. I find myself clicking around MUCH more than I have to.

  • Problems with image sizes

    There seems to be lots of confusion about image sizes and Apple iBookstore Support  et al simply state that images should not be greater than 2 megapixels.
    IBook Author Help > Photos and other images,  states:-
    Important:  When you export your book for distribution outside the iBookstore, images are automatically scaled to a width of 2048 pixels, which is optimized for iPad with Retina display. Readers can view these images on other iPad models, but the viewing experience might be slower. You can improve the viewing experience on iPad models without Retina display by using images no wider than 1024 pixels.
    http://support.apple.com/kb/HT5117 states:-
    Publishing to the iBookstore:
    If most of your readers will be using the original iPad, scale down images in Interactive Image widgets to a width of 2048 pixels and all other images to a width of 1024 pixels.
    Previewing on iPad, or exporting for distribution outside the iBookstore:
    You can improve the viewing experience on iPad models without Retina display by scaling down images in Interactive Image widgets to a width of 2048 pixels and all other images to a width of 1024 pixels.iBA help deals with exporting  books OUTSIDE the store and simply advises that you can  help none Retina viewers by having a smaller image.  No help at all really - but suggests that the use of images 2048 is OK. that would indicate 2048 x 1536 or 1496. No mention of what resolution should be used.
    iBookstore support basically reapeat this. 
    So  to ease life in getting books accepted,  should we all use 1024 x 768 @72ppi for iPad & iPad 2 and now iPad mini. ????
    and use 2048 x 1536 @ ??   for The New iPad Retina display!
    Both fail to mention HOW the books author would know which iPad a buyer/viewer will be using.  Also if "we" only use 1024 x 768, those with Retina do not get an "enhanced viewing experience".
    For a company that deals entirely with  devices that use logical programming - there seems very little logic  applied when it comes to dealing with a section of their business which by issueing iBA Free and wacking 30% of the top, must be adding to the $billions already stacked away in a corner somewhere.
    iBA makes eBooks for use/display on iPads only. For months now since iBA  became available, one of the  most common requests on this forum is help with....image sizes.
    It seems reasonable  now when Retina is in use and eventually the iPad and iPad 2 will fade away - ditto the new none retina mini and ALL Apple devices and  computers will be retina. So why not plan now!  Surely images in shoudl be geared to deal with Retina displays. IF  Apple would  take that line maybe  "Support" would have less work dealing with requests for help about images IF Apple accept that the next Stephen King may not have a clue how to deal with adjusting images sizes and simply state the required dimentions.
    I make photo books and use 2048 x 1496 @150ppi - so far ten free books have gone into the store.
    The suggestion about  images  for retina display as "standard" as been  sent as feedback.

    For all those who are still confused by Apples image restrictions / requirements...
    In the new Template chooser after the recent updates is "Antique". This template has a Chapter background image ( the olde world print of sailing ships in blue litho print style ). This print when opened in PS is 2771 x 1506 @72ppi. 2771x1506=4,173,126 pixels.This implies  Apple supply a book which does not comply with its own requirements!
    Higher  image resolution applied to printed photo inmages, make the image sharper. If for example you wanted to print a wall poster 45inches  wide, the  image needs needs a higher resolution to cater for the size, BUT the same image used for a 45" poster will print 4.5" wide print on your own printer!
    iBA full page is deemed to be 1024 x 748. resolution from Apple is 72ppi. An image with those specifications will be OK in iPad & iPad 2 - but not so sharp on a Retina display especially if zoomed larger on screen
    Now it seems 2048 x 1496 - double the original image size is suggested for Retina.
    You  can change an image in PS i.e. 1024 x 748 and change resolution to 144. PS will double the pixel size as you change the resolution. OK, just change pixel sizes back to 1024 x 748 and reolution is now 144.
    That indicates a sharper image which will be suitable for retina display and in fact all current iPad models.
    Today my 11th photo book was notified as available  in the iBook Store, all my images were pre-formatted at 2048 x 1496 @ 150ppi.   ( 2048 x 1496 = 3.063,808 pixels!)
    During delivery there were no issues flagged and after delivery no tickets.
    So I suggest all those folk pondering images sizes follow my example, which  is now proved to be accepatble!
    One thing puzzles me though, I dont use all images as full page and  they can  be masked down to - say - 250 x 200.  Should  just  make an image to fit the size I  want to display ??

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened
    the following image:
    The image appears with a purple color in Photoshop. If I hover over the image
    with a tool like lasso, it temporarily regains it´s original color. The image mode is RGB Color, 8 Bits/Channel.
    I resetted the start settings of Photoshop with the CTRL-Shift-Alt-combination, which had no effect.

    The confusion arises from the imprecise error message in the Preferences > Performance dialog box, to wit:
    OK, that seems to be open to misunderstanding indeed.
    The video card: Citrix Systems Inc. Display Driver.
    Could not find a list for CS6 specifically, but the card may fall short.
    http://helpx.adobe.com/photoshop/kb/tested-video-cards-photoshop-cs5.html
    If I invoke View > Proof Colors, the only thing that changes is that the text in the brackets
    Also if you set View > Proof Setup to something different?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Trouble Printing PDF's scanned with Image Capture

    OK this is a strange problem.  I have Macbook Pro and a Lexmark E230 laser printer which prints everything out just fine in safari, word, pages, numbers - anything except PDF's that are specifially scanned with the Image Capture application.
    I printed four PDF's that were made from different sources, some just assembled JPEGs, one that was text printed from Pages, and another instruction manual randomly downloaded from the internet.  All printed fine.
    My wife and I scan a lot for our home business and any PDF that we have scanned using Image Capture prints only the first page, then hangs, and then the rest of the document does not print.  If I try to print the second or other pages manually, I get an error printed on the page saying :
    ERROR: limitcheck
    OFFENDING COMMAND: image
    STACK:
    And the image partially prints. 
    I am aware of all driver issues, have tried using old drivers, completely reset the print system using the OPTION and ( - ) key in the printer system prefs.  I have also used the most up to date drivers, nothing seems to change this.  I am also aware of a printers limitations as far as using images or PDFs with a lot of memory. 
    The thing that makes me confused is that this all seemed to work perfectly before (in Lion) and even during the inital stages of Mountain Lion.  At some point (this is on my wife's computer), I'm not sure when the issues started exactly, I was unable to print PDFs scanned with Image Capture properly.
    This used to work, now it doesn't.  Printer hasn't changed, types of documents haven't changed.  Any ideas?
    Thanks so much,
    Jim

    Welcome to Apple Discussions, bubblebanium!
    I have experienced your problem on several occasions and found the culprit to be a corrupt font. Try selecting everything in the document and changing it to a font that you are certain prints. If the problem persists, try copying everything and paste it into a new document. If your document is several pages, try printing one page to hone in on the problem.
    If the problem still persists, does your document have bullet items? If yes, and the bulleted items were created with the automatic bullet feature, then the problem may be the default font used for that feature (most likely the Symbol font).
    To change to a different font, go to the Format menu, select Bullets and Numbering. Click on the style of bullets your document uses and then click the Customize button. In the next window, click on the shape of bullet your document uses and then click the Font button below. A Font window appears in which you can then select a different font. Afterwards, if the document prints, then the default font is probably corrupt and you may want to replace it with a good copy.
    Hope this helps.

  • Help with image ready on ps3 extended

    I am pretty new to photo shop and have cs3 extended.
    I have a Yorkie website where I cut out my Yorkies and paste them to differnet backgrounds.... a lady that does the ANIMATED pictures  HAS DID A COUPLE FOR ME ....BUT I NEED TO LEARN TO DO THIS MYSELF.  She will not tell folks how to do:)
    The problem is once you work with a pic that is animated already then try to  add a dog.....by pasting....it removes the animation in the background pic.... and the picture no longer moves once the dog is added ?....She said she puts thru IMAGE READY...which I do not see anywhere on CS3 extended.  I will try to insert a pic she did for me and any help would be greatly appreciated....as I can do but then the picture is no longer animated once altered in my photoshop but she is doing somehow.....so has to be poss ?  If I were to do this pic it would stop moving once the dogs were added....plus not as good as her but practicing........could it be the fact she is doing in layers and I am doing copy and paste...I do know she puts thru Image ready and I do not know where this is located on cs3 extended or how to do?
    am

    well...........l when I try to open Gif with the import and chose the video frames to layers...am getting a message saying I need Quicktime 7.1 to be able to do??? and when selecting import that is the only option I have to open my animated picture?...YOU HAVE BEEN SO MUCH HELP!   THANK YOU SO MUCH...! 
       BLUE MONDAY EXCLUSIVES   
    Date: Sat, 17 Apr 2010 20:23:27 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: Help with image ready on ps3 extended
    I'm not sure anyone mentioned this but if not to open GIFs using the import you have to enter the GIF name as GIF isn't listed as one of the options.
    It sounds like you are viewing the images in a maximized screen mode. To view more than one document, press F to cycle through the screen modes. FYI, only the contents of the currently selected document can be viewed in the layers palette.
    I'll just talk about copy/paste so as not to confuse...
    If you are going to copy/paste, click the frame around the dog document to target it. Your layers palette will now contain the contents of the dog document. Click on the layer in the layers palette with the selected dog over transparency. With that layer highlighted in your layers palette, press Ctrl A; then Ctrl C. (Select<Select All; Edit<copy if you prefer using the menu.) This will copy that layer into your clipboard.
    Next, click the frame of the document containing the animation. Click the topmost layer in the layers palette because we want you dog to be in the top layer. Press Ctrl + V. (Edit<Paste if you prefer using the menu).
    Your dog is most likely going to be too big. Use Edit<Free Transform to size and move the dog to the desired location.
    At this point, your dog should be showing in each frame in the animation palette.
    Example:
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/25315/with-palettes-open.jpg
    I'm using the older Image Ready me method. The highlighted place in the palette is where you switch methods between the old method and the new timeline. Notice, I have the layers and animation palette both in the workspace...and I'm not in a maximized mode. The red arrow shows the correlation between the frame and the layer represented by it in the layers palette.
    Image:second-image.jpg
    Here I have a second image to slip into my animation. I have the creature selected and on it's own layer with transparency around it. Notice that the the layer with the isolated creature is highlighted. At this stage, I'll press Ctrl + A; then Ctrl + C to select and save this image to my clipboard.
    Image:creature-added.jpg
    Here, I've pasted (Ctrl + V or Edit<Paste) in my creature and resized it (Ctrl + T or Edit<free transform) so he can be jumped. I also added a shadow under my creature which I added to a layer under my creature. Notice that when Frame on is selected in the animation palette that the eye is on both the creature and the shadow. If I click the eye to turn them (creature and shadow layer) off, they disappear from the entire animation. I can make them appear at any frame by clicking the desired frame in the animation then turning on the eye icon for the creature and shadow layer in the layers palette. I can also adjust opacity if desired.
    You could even more than the one image if you want the dog to appear to move. Use the eyeball visibility to determine which pose will be used for that frame.
    Example:
    Image:jump-creature-gif.gif
    Here, I used transform warp to adjust the pose of the creature for a few frames as he's jumping the creature...just for fun.
    >

  • Help needed with image

    I currently need a web page to be turned to image, so that later i can paint boxes and regions for classifying the various part of the page. The problem is the page is dumped to a jpg but the program doesnt wait for the page to load and gives me a blank screen shot. below is the code
    JEditorPane jep = new JEditorPane();
    jep.setEditable(false);
    try {
    jep.setPage("http://www.google.com");
    catch (IOException e) {
    jep.setContentType("text/html");
    jep.setText("<html>Could not load Page </html>");
    JScrollPane scrollPane = new JScrollPane(jep);
    JFrame f = new JFrame("Displaying Web Page");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(scrollPane);
    f.setSize(512, 342);
    f.setVisible(true);
    Image image2 = scrollPane.createImage(800,600);
    BufferedImage image = (BufferedImage) image2;
    try {
    ImageIO.write(image, "jpg", new File("c:\\Temp\\tt.jpg"));
    } catch (IOException ex) {
    ex.printStackTrace();
    The image was turned to BufferedImage since it gave me errors when I tried to give write the image file.
    I think there needs to be some sort of wait operation but cannot figure out :\
    Any help would be greatly appreciated.
    Thanks in Advance
    Sceptre

    what do u mean by stack trace ?
    the problem is not the error with the image file, that is solved by using BufferedImage.
    The Problem is the program not waiting for the page to load before taking the screen shot.
    As for the error when using an Image for the ImageIO.write it was the following:
    symbol : method write(java.awt.Image,java.lang.String,java.io.File)
    location: class javax.imageio.ImageIO
    ImageIO.write(image2, "jpg", new File("c:\\Temp\\tt.jpg"));
    1 error
    Sorry if I wasn't clear

  • I am confused with the adobe photo shop album starter 3.0!

    Hello, I have always been interested in storing pictures on my computer via my scanner or digital camera, but now I want to organise them using adobe.. However it has left me more confused.. since I downloaded it, it automatically imported pictures...but when I click on my regular photo files on my desk top, it does say adobe photo shop at the top of the picture- so does this mean it is already imported into the adobe?? as i am confused with what photos I have got where now.
    In other words, I wanna make sure that all my pictures on my computer are in adobe. How do I do that ?
    Excuse the daft question but I hate computers sometimes!
    Thanks

    Hi again Colin(and Jim), if I got the wrong end of the stick (which it appears I did) then I humbly apologise for being oversensitive. I have had some miserable experiences in newsgroup forums before now and witnessed relentless bullying on occasions and so I may respond in a defensive matter automatically. Thank you for setting me straight :-)
    On a different tack, I wonder if you could help with another PSASE problem I have. When I go to print a number of prints on one page (eg.four to an A4 sheet-which it resizes to fit for you) there seems to be a loss of quality in the images. Is there a way of adjusting the resolution within the program, or do I need to adjust them within photoshop first ?

  • A little more help with image

    I have refered to this thread to help me create my background image.
    http://forum.java.sun.com/thread.jspa?threadID=599393&messageID=3196643
    However I am stuck mostly because of not really fully grasping all the objects and how they work yet.
    Basically right now I have a JFrame and then I have a container which I put all my objects in.
    First question:
    What exactly does the following line of code do?
    Container contentPane = getContentPane();
    Does the "getContentPane()" method get the JFrame, since this is the class this line of code is embedded in?
    It sets contentPane which is a container to the JFrame?
    Second question...
    So using the above link I created a class called BackgroundImage and it works ...sort of. I have two windows - one is my JFrame game and the other is this background frame.
    Now I knew this would happen and I realize what I am supposed to do but I have been unsuccessful. Basically I need to make this JPanel my contentPane right?
    But when I say something like
    JPanel contentPane = panel my JFrame has nothing in it...
    How do I take this seperate window and incorporate it into what I already have.
    I want to use the contentPane variable since this is the variable where everything gets added throughout the code? I can't seem to get the JPanel to work.
    Take a look at some code snippets:
    public class DungMast extends JFrame
        /** Creates a new instance of EventPress */
        public DungMast() {
            Animation_Complete=false;
            Current_Level = 1;
            Level_Complete = false;
            CreateUserInterface();
            JPanel panel = new JPanel()
            protected void paintComponent(Graphics g)
           //  Dispaly image at at full size
         g.drawImage(img_BG.getImage(), 0, 0, null);
         //  Scale image to size of component
    //                    Dimension d = getSize();
    //                    g.drawImage icon.getImage(), 0, 0, d.width, d.height, null);
                        //  Fix the image position in the scroll pane
    //                    Point p = scrollPane.getViewport().getViewPosition();
    //                    g.drawImage(icon.getImage(), p.x, p.y, null);
                        super.paintComponent(g);
             panel.setOpaque( false );
             panel.setPreferredSize( new Dimension(400, 400) );
             scrollPane = new JScrollPane( panel );
             getContentPane().add( scrollPane );
             JButton button = new JButton( "Hello" );
             panel.add( button );
        }  //end constructor for main JFrame
    //Then I have something like
    JPanel contentPane = panel;
    }

    What exactly does the following line of code do?
    Container contentPane = getContentPane();
    It gets the content pane for the JFrame and saves a reference to it for later use, viz,
    the reference "contentPane" can be used to call methods in the Container class.
    Lightweight (Swing) top&#8211;level containers have a content pane that holds the child
    components for the parent container. See the comments section of the JRootPane class api
    for a birds&#8211;eye view.
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class BackgroundImage {
        private JPanel getContent(BufferedImage image) {
            // Make up our own content pane with an image
            // in the background.
            ContentPanel cp = new ContentPanel(image);
            // Add some components.
            cp.setLayout(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weightx = 1.0;
            gbc.weighty = 1.0;
            for(int j = 0; j < 10; j++) {
                gbc.gridwidth = (j+1)%3 == 0 ? gbc.REMAINDER : 1;
                cp.add(new JButton(String.valueOf(j+1)), gbc);
            return cp;
        public static void main(String[] args) throws IOException {
            BufferedImage image = ImageIO.read(new File("images/cougar.jpg"));
            BackgroundImage test = new BackgroundImage();
            JFrame f = new JFrame();
            System.out.println("Default contentPane = " +
                                f.getContentPane().getClass().getName());
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(test.getContent(image));
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class ContentPanel extends JPanel {
        BufferedImage image;
        public ContentPanel(BufferedImage image) {
            this.image = image;
            // This is required for JComponents that are used
            // as content panes since the Ocean LookAndFeel
            // (which can have non-opaque panels) was introduced.
            // Content panes must be opaque so they can draw
            // themseves and their child components.
            setOpaque(true);
            System.out.println("Default layout manager = " +
                                getLayout().getClass().getName());
        protected void paintComponent(Graphics g) {
            // Fill background with opaque color.
            super.paintComponent(g);
            int w = getWidth();
            int h = getHeight();
            int x = (w - image.getWidth())/2;
            int y = (h - image.getHeight())/2;
            g.drawImage(image, x, y, this);
    }

  • Custmoize the Webpart header with Image

    Hi,
    I would like to customize the web part header's with image in sharepoint 2013. How do i custmoize using CSS.
    The below one is custmoized in Sharepoint 2010. The same i want to do it in Sharepoint 2013.
    <wrap type="none"></wrap><anchorlock></anchorlock><//span>
    And he CS for the above is
    .ms-WPHeader > TD{
     background-image: url('/Style Library/HRSite/WP-MidBlue.png');
     background-repeat:repeat-x;
     padding-
     padding-right:1px;
     height:33px;
     border-bottom-style:none!important;
     border-bottom-color:inherit!important;
     border-bottom-width:0px!important;
    .ms-WPHeader td:first-child{
     width:5px;
     background-image:url('/Style Library/HRSite/WP-LeftBlue.png')!important;
     background-repeat:no-repeat;
    .ms-wpTdSpace{
     width:7px;
     background-image:url('/Style Library/HRSite/WP-RightBlue.png')!important;
     background-repeat:no-repeat;
     background-color:transparent;
    Any help is much appreciated.

    You should be able to do that. i.e. Put a div tag as the first section, create a CSS class with image background, apply the same CSS class to all webpart.
    If you want to use the MS default CSS class, you may want to use something like ms-webpart-zone to identify the web part you want to modify.
    If this sounds confusing, here are the steps,
    1. identify a MS class that you can use to get the starting element of your web part.
    2. append your heading element to the web part element, assign a custom class name to this element
    3. define the class you used in step 2.
    John Architect

  • I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.  I've been unable to locate an app that will do this.

    I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
    I've been unable to locate an app that will do this.  The Photos app that comes with the phone or iPad has extremely limited duration controls.  PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
    iPhoto for iPad is getting some terrible recent reviews.  I tried a couple other free apps but they don't use Airplay.
    I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV.  I've thought the iPad or iPhone would be a lower profile controller.
    Am I out of luck?

    Thanks for your help.  Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV.  I guess I'm just stuck with using iPhoto on my MB Air.  Thanks again.
    paul

  • WYSIWYG editor upload with images

    Hello, friends!
    I need help solving following problem:
    I need to create WYSIWYG editor, which just to enter text and image. Other options (like font-size, font-weight...) not need. Then when submit the form with richedit, all data in form with images must sent to server.
    1) images must upload
    2) text must content following: text <img="src=../image1.png"> text <img="src=../image2.png"> text
    or maybe all images must save as a blob data
    Help me, people!

    Is this an Oracle question?

  • Online banking site now shows login page as text-only; on different computer it still shows page with images and clickables -- is there a fix?

    Previously when I logged in to my INGdirect online bank account, the login window came up showing images and clickable hotspots. Recently, the login window changed to a text-only version. On two different computers running Firefox, the login comes up in the previous version, with images and clickable hotspots. I'm unaware of having done anything to change my settings either in Firefox or on the banking website. Because it seems to be localized on this computer, I've tried downloading latest version of Firefox, but got no change, login still comes up in text-only format.

    Try clearing your browser cache.
    Tools > Clear Recent History... - hit Details and make sure only Cache is selected, then select Everything and hit the Clear Now button.

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • Exception while Exporting Datagridview data with Images to Excel...

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

Maybe you are looking for

  • How to setup iCloud into my iPhone 3GS ?

    how to setup iCloud into my iPhone 3GS ?

  • Lion - pdf-x has gone - what now?

    I'm missing the pdf-x item in lion. Does anybody know an alternative? Until we switched to Lion we used the "save as pdf-X" for giving flowcharts designed in omnigraffle to our printing department, which can only deal with pdf-x files to ensure the c

  • Google Merchant Base

    has anyone figured out a relatively painless way to upload items to Google Merchant Center (google shopping) and Ebay?  Just curious last i heard anyone ask about this it was 2010.

  • Libpixbufloader-svg.so: libpng15.so.15: cannot open shared object file

    While updating, I got: [2013-05-05 19:31] [PACMAN] upgraded cups-filters (1.0.34-2 -> 1.0.34-3) [2013-05-05 19:31] [ALPM-SCRIPTLET] gtk-update-icon-cache: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such f

  • [solved] dnsmasq doesn't start

    After last yesterdays upgrade my dnsmasq could not start. Init script shows it started properly, but there wasn't any dnsmasq process. There was nothing in log also. I tryed to resync package, and I get this: (I translated polish errors descriptions)