Problem in save  image

Here i write text inside image then the image which contain text drawn on stegoPanel i want to save this stego image .
when i save it the file appear put not contain the image
// imports
public class TestImage extends JFrame {
    private JPanel mainPanel;
    private DisplayPanel displayPanel, stegoPanel;
    private JButton openButton, saveButton, empededButton, extractButton;
    private JFileChooser fileChooser;
    private JScrollPane normalScrollPane, stegoScrollPane;
    private JTextArea area;
    private MyActionListener actionListener;
    public TestImage() {
        actionListener = new MyActionListener();
        fileChooser = new JFileChooser();
        intializeingPanel();
        intializeingButtons();
        intializeingArea();
        getContentPane().add(mainPanel);
    public static void main(String[] args) {
        TestImage testImage = new TestImage();
        testImage.setDefaultCloseOperation(TestImage.EXIT_ON_CLOSE);
        testImage.setSize(new Dimension(600, 300));
        testImage.setLocationRelativeTo(null);
        testImage.setVisible(true);
        testImage.setExtendedState(MAXIMIZED_BOTH);
    private void intializeingPanel() {
        mainPanel = new JPanel(null);
        mainPanel.setBounds(100, 10, 600, 300);
        displayPanel = new DisplayPanel();
        TitledBorder normalImageBorder = new TitledBorder("Normal image");
        displayPanel.setBorder(normalImageBorder);
        displayPanel.setBackground(Color.WHITE);
        normalScrollPane = new JScrollPane(displayPanel,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        normalScrollPane.setBounds(50, 150, 200, 300);
        mainPanel.add(normalScrollPane);
        stegoPanel = new DisplayPanel();
        TitledBorder stegoImageBorder = new TitledBorder("Stego image");
        stegoPanel.setBorder(stegoImageBorder);
        stegoPanel.setBackground(Color.WHITE);
        stegoScrollPane = new JScrollPane(stegoPanel,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        stegoScrollPane.setBounds(300, 150, 200, 300);
        mainPanel.add(stegoScrollPane);
    private void intializeingButtons() {
        openButton = new JButton("Open");
        openButton.setBounds(50, 10, 100, 50);
        openButton.addActionListener(actionListener);
        mainPanel.add(openButton);
        saveButton = new JButton("Save as");
        saveButton.setBounds(150, 10, 100, 50);
        saveButton.addActionListener(actionListener);
        mainPanel.add(saveButton);
        empededButton = new JButton("Hide message");
        empededButton.setBounds(250, 10, 100, 50);
        empededButton.addActionListener(actionListener);
        mainPanel.add(empededButton);
     extractButton = new JButton("Extract message");
        extractButton.setBounds(350, 10, 100, 50);
        mainPanel.add(extractButton);
    private void intializeingArea() {
        area = new JTextArea();
        JScrollPane scrollPane = new JScrollPane(area);
        scrollPane.setBounds(50, 500, 400, 200);
        mainPanel.add(scrollPane);
    private class MyActionListener implements ActionListener {
        public void actionPerformed(ActionEvent e) {
            String str = area.getText();
            BufferedImage image = null;
            BufferedImage saveBufferedImage = null;
            int[] imageData;
            int[] img;
            int offset = 0;
            if (e.getSource() == openButton) {
                int returnValue = fileChooser.showOpenDialog(TestImage.this);
                if (returnValue == JFileChooser.APPROVE_OPTION) {
                    File openFile = fileChooser.getSelectedFile();
                    try {
                        displayPanel.setBufferedImage(ImageIO.read(openFile));
                        repaint();
                    } catch (Exception exception) {
                        exception.printStackTrace();
            } else if (e.getSource() == saveButton) {
                image = stegoPanel.getBufferedImage();
                imageData = getImageData(image);
                try {
                    img = hideing_text(imageData, str.getBytes("US-ASCII"), offset);
                    try {
                        saveBufferedImage = toImage(image.getWidth(), image.getHeight(), img);
                    } catch (IOException ex) {
                        ex.printStackTrace();
                } catch (UnsupportedEncodingException ex) {
                    ex.printStackTrace();
                int returnValue = fileChooser.showSaveDialog(TestImage.this);
                if (returnValue == JFileChooser.APPROVE_OPTION) {
                    try {
                        File selectedFile = fileChooser.getSelectedFile();
                        String fileName = selectedFile.getName();
                        String format = fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()).toLowerCase();
                        for (String name : ImageIO.getWriterFormatNames()) {
                            System.out.print("\nName: " + name + " format: " + format);
                            if (name.equals(format)) {
                                ImageIO.write(saveBufferedImage, format, selectedFile);
                                Iterator iter = ImageIO.getImageWritersByFormatName(format);
                                ImageWriter writer = (ImageWriter) iter.next();
                                ImageWriteParam iwp = writer.getDefaultWriteParam();                                FileImageOutputStream output = new FileImageOutputStream(selectedFile);
                                writer.setOutput(output);
                                IIOImage ioImage = new IIOImage(stegoPanel.getBufferedImage(), null, null);
                                writer.write(null, ioImage, iwp);
                                writer.dispose();
                            } else {
                                System.out.println(" format is not supported");
                    } catch (IOException ex) {
                        ex.printStackTrace();
            } else if (e.getSource() == empededButton) {
                try {
                    System.out.println("is not null");
                    image = displayPanel.getBufferedImage();
                    imageData = getImageData(image);
                    img = hideing_text(imageData, str.getBytes("US-ASCII"), offset);
                    stegoPanel.setBufferedImage(toImage(image.getWidth(), image.getHeight(), img));
                    repaint();
                } catch (UnsupportedEncodingException ex) {
                    ex.printStackTrace();
                } catch (IOException ex) {
                    ex.printStackTrace();
                JOptionPane.showMessageDialog(null, "The message is hide");
        }Edited by: william_beshoy on Feb 9, 2010 5:59 PM
Edited by: william_beshoy on Feb 9, 2010 5:59 PM

The rest of the above code:
private int[] hideing_text(int[] image, byte[] text, int offset) {
            try {
                if (((text.length) * 8) + offset > image.length) {
                    throw new IOException();
                } else {
                    for (int i = 0; i < text.length; ++i) {
                        int textbyte = text;
for (int bit = 7; bit >= 0; bit--, offset++) {
int b = (textbyte >> bit) & 1;
image[offset] = ((image[offset] & 0xFE) | b);
} catch (IOException e) {
e.printStackTrace();
return image;
private int[] getImageData(BufferedImage image) {
int size = image.getWidth() * image.getHeight();
int[] buffer = new int[size];
image.getRGB(0, 0, image.getWidth(), image.getHeight(), buffer, 0, image.getWidth());
return buffer;
public BufferedImage toImage(int w, int h, int[] data) throws IOException {
BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
image.setRGB(0, 0, w, h, data, 0, w);
return image;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import javax.swing.JPanel;
public class DisplayPanel extends JPanel {
private BufferedImage bufferedImage;
private Dimension PanelDimension = new Dimension();
public void setBufferedImage(BufferedImage bufferedImage) {
this.bufferedImage = bufferedImage;
PanelDimension.setSize(bufferedImage.getWidth(), bufferedImage.getHeight());
setPreferredSize(PanelDimension);
revalidate();
public BufferedImage getBufferedImage() {
return bufferedImage;
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (bufferedImage != null) {
g.drawImage(bufferedImage, 0, 0, this);
Thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Can't save images - not responding

    With the latest Firefox on Windows 8.1, if I right click to save an image, it doesn't work. The Save screen comes up, but the buttons along the bottom are missing. The blue circle is spinning. Then it will say "not responding: and there is no way to get out, except to close the program. I've tried turning off other programs and starting in safe mode, with no add-ons, but I have the same problem.

    I am using Firefox 26.0 with WinXP Pro SP3 (oldie but a goodie) and my problem with Save Image As is slightly different.
    On this website http://recordsearch.naa.gov.au/scripts/Imagine.asp?B=31735088 there are 33 separate image pages in .JPG format in the file. To save images in high resolution first click on the Enlarge option at top left. Now right-click on the image and select Save Image As and you should get the save folder & file name screen as expected. In a normal situation the folder to save the file in and the filename can be modified to whatever is desired as long as the extension remains unaltered. It will be noted here that the default filename has a .asp extension. It becomes necessary to change the extension from .asp to .jpg for each of the 33 image pages in the file otherwise the image viewer program can't open them later. I dare say that the pages could all be saved with the .asp extension butit would then be necessary to go back and rename them to .jpg later. Quite inconvenient really....
    IE8 doesn't have this problem. It correctly identifies the images as .jpg so saving is a simple task. Firefox has a problem which should be easy to fix. Surely it shouldn't be difficult for it to recognise a filename extension correctly.

  • After downloading IO6, can't capture photos from Facebook. I get "save photo" instead of "save image".  While browsing, save image comes up and photos save to camera roll.  Seems to be a problem only on FB.

    Downloaded IO6 on my iPhone 4s.  Now I can't capture a photo off Facebook to the camera roll.  When I try, I get a "Save Photo" tab rather than a "Save Image" button,  The photo does not save to camera roll.  For email images and Safari images, "save image" comes up and save to camera roll.  Seems only a problem with images on FB.  Any ideas?  Thanks

    You launched iPhoto and from its Preferences you selected Connecting camera opens.....

  • Problems with screen saver image quality

    Just got a MPB 15 inch. Very happy with it but have a small problem with the screen saver. I use my i Photo folders as the source for screen saver images. Some photos are shown in very good quality but others are very poor - as if low res. The original images are all of the same high quality. Seems to occur whichever video setting is used under power saving. A minor issue I now but any ideas?

    Hi, Mark. Apparently some of the photos being used are low-resolution thumbnails, not full-resolution images.
    What version of iPhoto do you have, and which OS version are you running? On my MBP running 10.5.6 and iPhoto 7.1.5, "All folders" is not an option in the Screensaver pane of System Prefs, so I don't know what you're actually choosing. But if I select "Pictures" (which refers to the Pictures folder in my Home folder), then the screensaver uses every .jpg file that it finds in any of the several iPhoto Libraries inside my Pictures folder. The thumbnails created by iPhoto are .jpgs, so they get used by the screensaver along with full-size high-resolution images.
    The solution is not to select a folder that contains any thumbnails.

  • I have problems with uploading images to my printing company have the images have been manipulated through CS6 i have saved images as jpeg but the printer company tell me they are not j peg, they will not upload images save from a camera are fine

    I have problems with uploading images to my internet printing company when  the images have been manipulated through CS6 and  i have saved images as jpeg  the printer company tell me they are not j peg,
    but images saved from my phone or camera images that have not been manipulated upload fine, What am i doing wrong?

    Save/Export them as JPG. Photoshop defaults to PSD, so make sure you select JPG and not just rename the file to .jpg.
    There are two ways to save them as JPG: Regular Save as option or Save for Web & Devices
    Take your pick.

  • Save image as problem in file type in the dialogue box it is blank

    Hi,
    when I right click on an image to save image as from the firefox browser, the dialogue box opens with the file name written but file type is blank and when i click on it it show one option all files. It was showing before many choices like (JPEG, PNG, GIF, etc...). I guess this happened after I did a system restore to my desktop to its factory settings. So i can't choose which type to save the image in. I checked all the previous articles regarding this issue and did some solutions like clearing the Temporary Internet Files all didn't work out.
    System Information:
    windows 7 (64-Bit),
    Firefox 15.0.
    Desktop: XPS 8300.
    Any kind of help is really appreciated.
    Thank You.

    Try to delete the mimeTypes.rdf file in the Firefox Profile Folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    You can also try to clear the Cache.
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"

  • Problem with how FeuerFuchs saves images

    FeuerFuchs presently seems to work like this. You load a page displaying an image or images. You like one or more of them and you want to save them. Each time you tell FeuerFuchs to save an image, instead of copying that image from wherever it's stored in order to display it on your screen to the folder you want to save it to, FeuerFuchs re-downloads that image.
    Can someone please tell me why FeuerFuchs is programmed to re-download images it's told to save instead of copying them from wherever they're stored in order to display it on the screen? It seems like that only serves to increase bandwidth usage.

    I've got that and it's great for if I want to save all the images from one or more tabs. But it only saves images from entire tabs instead of one out of several images in a tab and the treeview navigation is slower than using the shortcuts I use to jump from one folder to the next.

  • TWO CRITICAL BUGS: 1) File, "Save Page As" and 2) right-click the picture and select "Save Image As", both do not work at all in Firefox 27, 28, and 29!

    Note: capitals are used only to highlight important words.
    PLEASE, TAKE THESE COMMENTS ON TWO CRITICAL BUGS VERY SERIOUSLY BECAUSE THE BUGS DESCRIBED BELOW ARE SO CRITICAL THAT I CANNOT USE THE LATEST VERSION OF FIREFOX UNLESS THEY DO NOT APPEAR IN THE LATEST VERSION AND THEREFORE I AM FORCED TO REVERT BACK TO FIREFOX 26.
    I have Windows 7 64-bit and Firefox 26. I could not install Firefox 27, 28, and 29 due to the persistent presence of the two critical bugs described below. I have 8 GB of RAM and an Intel quad-core processor and a lot of hard disk space available.
    I installed Firefox 27 and then Firefox 28 a while back and these two bugs described below were still present and now I have just checked again with Firefox 29 by installing it and yet again, these two bugs described below are present!! UNBELIEVABLE THAT THESE TWO CRITICAL BUGS ARE STILL PRESENT IN FIREFOX 29 WHEN I CLEARLY INFORMED YOU ABOUT THEM IN THE HELP, SUBMIT LINK OF FIREFOX!!
    I am forced to revert to Firefox 26!
    First, I use Windows 7 64-bit and I always use Firefox with at least 120 tabs opened. BUT I have 8 GB of RAM, an Intel core i7 quad-core processor and more than 1 TB of hard disk space. Consequently, I do not understand why I would have these two critical bugs.
    With Firefox 26, I also have at least 120 tabs opened when I start Firefox and I do not have the two critical bugs described below, therefore I do not believe that the number of tabs is the reason of the two critical bugs that are present in Firefox 27, 28, and 29.
    ---FIRST CRITICAL BUG:
    When I open ANY web page and do File, "Save Page As", the window that is supposed to open to locate the folder where I want to save this web page does NOT open at all, even if I wait a long time to see if it opens.
    Same problem happened with Firefox 27, 28, and now 29!! When I reverted back to Firefox 26, this problem did NOT happen anymore!
    ---SECOND CRITICAL BUG:
    When I use Google Images, for instance entering model in the search field of Google Images and then pressing enter.
    Then I select any picture, open to a new tab this selected picture, then open a new tab by selecting the option View for this picture. Then right-click the picture and select "Save Image As".
    Again, the window that is supposed to open to locate the folder where I want to save this picture does NOT open at all, even if I wait a long time to see if it opens.
    Same problem happened with Firefox 27, 28, and now 29!! When I reverted back to Firefox 26, this problem did NOT happen anymore!
    ---THESE TWO CRITICAL BUGS DO NOT APPEAR WHEN I USE INTERNET EXPLORER 11.
    I have no idea if you will be able to reproduce these two critical BUGS but I can assure you that they are not present when I use Firefox 26 and they are present when I use Firefox 27, 28, and 29. More, be aware that I have at least 100 tabs opened but I also have this same number of tabs opened in Firefox 26 and yet I do not experience these two critical bugs when I have Firefox 26!
    Once again, these two bugs touch at two vital, critical very basic functions of Firefox and therefore I will NOT be able to use any version above 26 if these two bugs are still present, as they are present in Firefox 27, 28, and now 29!!!
    Please, make it a priority to solve these two critical bugs. Thanks.
    I did read a post related to the same issues “Firefox stops responding when trying to "save page" or "save image" | Firefox Support Forum | Mozilla Support” at https://support.mozilla.org/en-US/questions/991630?esab=a&as=aaq
    I am still reading it again to try to figure out exactly what the person did to make his problems be solved, as the post is not clear at all on what solved the problems!
    In any case, all the suggestions proposed in this post do not work and I surely cannot do a system restore when it is obvious that the two bugs do not appear in Internet Explorer.

    First, I sent an email to the author of PhotoME to inform him of the serious issues his addon caused with Firefox latest versions.
    Now, for those of you who do not have the PhotoME addon and yet experience the same problem that I had and that I described above, I suggest the following strategy.
    As PhotoME did cause these problems with Firefox latest versions, I am pretty covinved other addons probably might cause these problems too. Therefore, adopt the following method.
    Test one addon at a time to see if this particular addon is behind your Firefox issues like the ones I had.
    So, disable one addon only at a time. Then close your Firefox and restart it from scratch and see if you still have your Firefox problems. You must restart the Firefox browser from scratch. If you still have these Firefox problems, re-enable the disabled addon, restart your Firefox (again!) and repeat the same method for every single addon that you have.
    Try to be selective by choosing first addons that are more likely to cause your Firefox problems such as not very well-known or not very popular addons (like it was the case for the PhotoME addon).
    If this method works or if it does not work, report it on this web page so that others can be helped with your comments.
    I hope this method will help you because I was really upset that I had these Firefox problems and I first thought it was the fault of Firefox, only to discover later that this PhotoME addon was the culprit and had caused me such upset.

  • Firefox saves images to wrong location, but only when using "View Image"

    For a while, I have had the problem above. I can save images just fine if I don't use the "view image" function first, with the images going to the intended folders.
    Just to clarify, unlike some of similar problems I have seen described here, I am perfectly happy with Firefox remembering where I wish my pictures to go, on a site to site, or model to model (within the same site) basis.
    The problem lies in that if I use the "view image" function, either in a new tab, or in the existing one, Firefox will often prompt me to save in a random folder where I have previously saved a picture. It will even suggest folders that I have not accessed for days.
    Example:
    I save image A to folder A, by right clicking the image and selecting "save image as".
    I then (immediately after this), right click image A again, select "view image", then right click the resulting picture, and select "save image as". Now there is a fine chance that it want me to save the image to some other (previously used) image folder, even if I have not used the folder for a while, and even though I have just saved the same image to folder A.
    This problem persists with multiple image file types, on multiple sites (I just tried it with someones avatar in this forum, and it wanted me to put it with my holiday pictures from 3 weeks ago).
    I appreciate any assistance you can give - jinxie
    FYI; If I "one-click" a file (like an mp4) to download it, it goes to my main / default download folder as normal.

    This is because Firefox will track where you have saved images or other files from the website domain. Then whenever you select to save the file to your computer, Firefox will start the Save As wizard in the latest folder that you have used last time.
    Here is an example:<br>
    If you save an image from the domain <code>123.com</code> into the folder <code>123</code> it will save there. Then you save an image from the domain <code>456.com</code> to the folder <code>456</code>. Next you save a different image from the domain <code>123.com</code>. The save as wizard will assume that you want to save it with the other image from that domain and will automatically start in the <code>123</code> folder.<br>
    This can make saving files faster and more organized, however not everyone wants this feature enabled.
    To disable this feature you can do the following:
    #Go to <code>about:config</code> in Firefox
    #Locate the <code>browser.download.lastDir.savePerSite</code> string
    #Change the value to <code>false</code>
    This should fix the issue, but please report back if it doesn't.

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • Right click - save image keeps saving to wrong location

    I moved my firefox profile over from my old computer.
    Now when i do right click -> save image as, it SOMETIMES defaults to C:\Users\test\Documents. Which was my old default location.
    I have changed it to C:\Users\Question\Documents on my current computer but it randomly changes back to C:\Users\test\Documents. I cannot find a pattern that causes it to change, but it seems to happen mainly after i restart my computer (not always though).
    Can someone please tell me how to get it to change to C:\Users\Question\Documents PERMANENTLY?

    Oh right i forgot the first answer to every problem is "reinstall firefox".
    Does anyone have a suggestion that does not involve reinstalling firefox and wiping my profile?

  • Firefox 32 hangs on "Save Image" dialogue box Windows 8.1..Tried everything

    I clean installed windows 8.1..
    then installed all latest drivers for my devices...
    installed latest Firefox..
    Then i needed some images ..so opened Google image search and searched images..opened one image in a New Tab.. clicked "View Image" and tried saving it by right clicking and selecting "Save Image"..
    First it took a lot of time for the "Save Image" window to appear..
    and then it hanged...
    I tried doing it again by force closing and re-opening firefox..but same thing happened even if the Image is small like 100X100 pixels..
    Then I opened the mozilla support questions and tried the following solutions some other users have suggested;
    1: Opened FIrefox in safe mode (Same thing happens)
    2: Disabled addons (Only addons i had was flash downloader and downthemall! - Same thing happens)
    3: Reset Firefox (No use)
    4: Disabled Hardware Acceleration (No Use - In fact firefox hangs as soon as I "View Image")
    4: reinstalled Firefox (No Use)
    5: Uninstalled my ATI Radeon display drivers (No Use)
    6: Disabled JAVA and Flash (No Use)
    So this problem still persists....and its quite annoying
    Another thing I have noticed is when i try to save/download other files like mp3 or email attachment or pdf .. The window where it shows whether to Open or Save the file opens immediately..but takes around 15 seconds before I can actually Select and option and click Ok.

    SOLVED - Atleast for Now....
    So I think I have found the solution to this problem...
    I reinstalled windows 8.1...
    Then did 2 things..
    1: Disabled Skydrive from Group Policy Editor and selected Always save files to local drive.
    2: Disabled Bing Search from local file search (Windows Key + C-> Settings->Search and Apps->Search)
    Installed Firefox..
    and Now I don't have the problem...
    I am going to install java, Flash and Addons ..and check again if the same problem occurs again..
    Will update what happens..

  • Firefox stops responding when trying to "save page" or "save image"

    Windows 7 64 bit and Firefox 28. When trying to 'Save Page' or 'Save Image' the save dialogue window is nearly blank, then info bar shows 'not responding'. I have tried all the tips in the support pages. Resetting Firefox, Starting Firefox in 'Safe Mode'. Upgrading graphics driver to latest version. Turning off 'Hardware Acceleration' in options. Nothing resolves the problem. This issue has only recently started, the last time I tried saving an image it worked fine, certainly prior to Microsoft's most recent 'upgrade Tuesday'.
    Edit:
    Checked the save dates of the last images I successfully saved from within Firefox and compared them to my windows update log. The Microsoft March 'Update Tuesday' was installed on March 14th. My last successfully saved Firefox images were saved the following day on March 15th. Thus it is unlikely that the Firefox saving issue is a result of a Windows Update corruption. So the question is what changes have Mozilla made to Firefox between 15th and 24th March 2014 ???

    I understand that finding a root cause is ideal, and I would be happy to further investigate this with you.
    Since it is still happening in Safe Mode [https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems please try to troubleshoot the plugins and extensions]
    The other route is to troubleshoot the downloads folder and antivirus to make sure the downloading of the image is not having an issue either. [http://mzl.la/LJ0h2w]
    In the meantime there is an add on that enables this [https://addons.mozilla.org/en-US/firefox/addon/save-images/ Save Images]
    Please post back with your results, there have been other reports, but no issue filed yet.

  • Can't save images into folders, Get info not detailing either.

    Hi,
    I'm new to Macs having just moved over 3 months ago from PC's and I'm having trouble with saving images and getting system information.  When I click on Go > Utilities > then click the down arrow next to the small cog icon I can easily see my system information starting with Spotlight Comments, General, More Info, Name and Extension, Preview, Sharing and Permissions (which I've set to Read & Write for MartinForbes (Me), staff and everyone).
    However when I try Go > Utilities > Martin's iMac > and click  on the same down arrow all I get is General, and Preview - and that is  it it even though it worked before.
    Another thing is happening as well.  When I'm trying to save an image from the internet into a specific folder the 'Save' button get greyed out, but it will only work in the most recent folders where I don't want this file to go. To put it into the folder I want , I have to save it into a folder that I DON'T want, then copy and the locate the intended folder and paste it the folder that I had intended.  This also is happening when I save a zip file in the 'Downloads' section and try to create a folder in say, my 'Widgets' folder where I can now no longer click on 'New Folder' as this too has been greyed out. I can see that the format after I've right clicked and selected 'Save Image As' is selected as 'Preview Document* and not 'All Files.
    Can someone shed some light on what I need to do to get this working please? 

    When you save an image, how can the browser possibly intuit where you want to save it?
    You need to tell it where to save it. To do this just treat it as any Finder window and navigate to the desired folder. But you need to expand the dialogue to allow you click to the place you want to go as per a Finder window.
    Then you can navigate to where you want it to be saved, and that position will become the default for next time until it is changed.
    As for changing permission and the like, normally that is not required unless you have a permission problem you are trying to fix. Usually your Mac has that already worked out for you.

  • How to play/record at same time and save image from video

    i started working on a project and that made my life hell although it was so simple. reason was that i couldnt find small/simple code to understand problems and no proper documents. . finally i have done that. and here is the code (without much complex code of interface). it shows vidoe, records a small part of it at start and takes a snapshot (no buttons or events involved). hope it might help someone starting to learn JMF.
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    import javax.media.Format;
    import javax.media.format.FormatChangeEvent;
    import javax.media.control.BufferControl;
    import javax.media.control.FrameGrabbingControl;
    import javax.imageio.ImageIO;
    import java.util.Date;
    import javax.media.util.BufferToImage;
    import java.awt.image.BufferedImage;
    * AVReceive2 to receive RTP transmission using the new RTP API.
    public class AVReceive2 implements ReceiveStreamListener, SessionListener,
    ControllerListener
    public static DataSource ds2, ds, ds3;
    String sessions[] = null;
    RTPManager mgrs[] = null;
    Vector playerWindows = null;
    boolean dataReceived = false;
    Object dataSync = new Object();
    public AVReceive2(String sessions[]) {
    this.sessions = sessions;
    public static DataSource getData() {
    return ds;
    protected boolean initialize() {
    try {
    InetAddress ipAddr;
    SessionAddress localAddr = new SessionAddress();
    SessionAddress destAddr;
    mgrs = new RTPManager[sessions.length];
    playerWindows = new Vector();
    SessionLabel session;
    // Open the RTP sessions.
    for (int i = 0; i < sessions.length; i++) {
    // Parse the session addresses.
    try {
    session = new SessionLabel(sessions);
    } catch (IllegalArgumentException e) {
    System.err.println("Failed to parse the session address given: " + sessions[i]);
    return false;
    System.err.println(" - Open RTP session for: addr: " + session.addr + " port: " + session.port + " ttl: " + session.ttl);
    mgrs[i] = (RTPManager) RTPManager.newInstance();
    mgrs[i].addSessionListener(this);
    mgrs[i].addReceiveStreamListener(this);
    ipAddr = InetAddress.getByName(session.addr);
    if( ipAddr.isMulticastAddress()) {
    // local and remote address pairs are identical:
    localAddr= new SessionAddress( ipAddr,
    session.port,
    session.ttl);
    destAddr = new SessionAddress( ipAddr,
    session.port,
    session.ttl);
    } else {
    localAddr= new SessionAddress( InetAddress.getLocalHost(),
    session.port);
    destAddr = new SessionAddress( ipAddr, session.port);
    mgrs[i].initialize( localAddr);
    // You can try out some other buffer size to see
    // if you can get better smoothness.
    BufferControl bc = (BufferControl)mgrs[i].getControl("javax.media.control.BufferControl");
    if (bc != null)
    bc.setBufferLength(350);
    mgrs[i].addTarget(destAddr);
    } catch (Exception e){
    System.err.println("Cannot create the RTP Session: " + e.getMessage());
    return false;
    // Wait for data to arrive before moving on.
    long then = System.currentTimeMillis();
    long waitingPeriod = 30000; // wait for a maximum of 30 secs.
    try{
    synchronized (dataSync) {
    while (!dataReceived &&
    System.currentTimeMillis() - then < waitingPeriod) {
    if (!dataReceived)
    System.err.println(" - Waiting for RTP data to arrive...");
    dataSync.wait(1000);
    } catch (Exception e) {}
    if (!dataReceived) {
    System.err.println("No RTP data was received.");
    close();
    return false;
    return true;
    public boolean isDone() {
    //return playerWindows.size() == 0;
    return false;
    * Close the players and the session managers.
    protected void close() {
    for (int i = 0; i < playerWindows.size(); i++) {
    try {
    ((PlayerWindow)playerWindows.elementAt(i)).close();
    } catch (Exception e) {}
    playerWindows.removeAllElements();
    // close the RTP session.
    for (int i = 0; i < mgrs.length; i++) {
    if (mgrs[i] != null) {
    mgrs[i].removeTargets( "Closing session from AVReceive2");
    mgrs[i].dispose();
    mgrs[i] = null;
    PlayerWindow find(Player p) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.player == p)
    return pw;
    return null;
    PlayerWindow find(ReceiveStream strm) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.stream == strm)
    return pw;
    return null;
    * SessionListener.
    public synchronized void update(SessionEvent evt) {
    if (evt instanceof NewParticipantEvent) {
    Participant p = ((NewParticipantEvent)evt).getParticipant();
    System.err.println(" - A new participant had just joined: " + p.getCNAME());
    * ReceiveStreamListener
    public synchronized void update( ReceiveStreamEvent evt) {
    RTPManager mgr = (RTPManager)evt.getSource();
    Participant participant = evt.getParticipant();     // could be null.
    ReceiveStream stream = evt.getReceiveStream(); // could be null.
    if (evt instanceof RemotePayloadChangeEvent) {
    System.err.println(" - Received an RTP PayloadChangeEvent.");
    System.err.println("Sorry, cannot handle payload change.");
    System.exit(0);
    else if (evt instanceof NewReceiveStreamEvent) {
    try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    //DataSource
    ds2 = stream.getDataSource(); // this original cant be used now
    // ds is used to play video
    ds = Manager.createCloneableDataSource(ds2);
    // ds3 is used to record video
    ds3 = ((SourceCloneable)ds).createClone();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
    System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());
    } else
    System.err.println(" - Recevied new RTP stream");
    if (participant == null)
    System.err.println(" The sender of this stream had yet to be identified.");
    else {
    System.err.println(" The stream comes from: " + participant.getCNAME());
    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
    return;
    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);
    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
    dataReceived = true;
    dataSync.notifyAll();
    } catch (Exception e) {
    e.printStackTrace();
    return;
    else if (evt instanceof StreamMappedEvent) {
    if (stream != null && stream.getDataSource() != null) {
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println(" - The previously unidentified stream ");
    if (ctl != null)
    System.err.println(" " + ctl.getFormat());
    System.err.println(" had now been identified as sent by: " + participant.getCNAME());
    else if (evt instanceof ByeEvent) {
    System.err.println(" - Got \"bye\" from: " + participant.getCNAME());
    PlayerWindow pw = find(stream);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    * ControllerListener for the Players.
    public synchronized void controllerUpdate(ControllerEvent ce) {
    Player p = (Player)ce.getSourceController();
    if (p == null)
    return;
    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
    PlayerWindow pw = find(p);
    if (pw == null) {
    // Some strange happened.
    System.err.println("Internal error!");
    System.exit(-1);
    pw.initialize();
    pw.setVisible(true);
    p.start();
    try {
    // make it wait so that video can start otherwise image will be null. u must call this method with a button
    Thread.sleep(2500);
    catch (Exception e) {
    e.printStackTrace();
    // Grab a frame from the capture device
    FrameGrabbingControl frameGrabber = (FrameGrabbingControl) p.getControl(
    "javax.media.control.FrameGrabbingControl");
    Buffer buf = frameGrabber.grabFrame();
    // Convert frame to an buffered image so it can be processed and saved
    Image img = (new BufferToImage( (VideoFormat) buf.getFormat()).
    createImage(buf));
    BufferedImage buffImg = new BufferedImage(img.getWidth(null),
    img.getHeight(null),
    BufferedImage.TYPE_INT_RGB);
    Graphics2D g = buffImg.createGraphics();
    g.drawImage(img, null, null);
    // Overlay curent time on image
    g.setColor(Color.RED);
    g.setFont(new Font("Verdana", Font.BOLD, 12));
    g.drawString( (new Date()).toString(), 10, 25);
    try { // Save image to disk as PNG
    ImageIO.write(buffImg, "jpeg", new File("c:\\webcam.jpg"));
    catch (Exception e) {
    e.printStackTrace();
    // this will record the video for a few seconds. this should also be called properly by menu or buttons
    record(ds3);
    if (ce instanceof ControllerErrorEvent) {
    p.removeControllerListener(this);
    PlayerWindow pw = find(p);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    System.err.println("AVReceive2 internal error: " + ce);
    * A utility class to parse the session addresses.
    class SessionLabel {
    public String addr = null;
    public int port;
    public int ttl = 1;
    SessionLabel(String session) throws IllegalArgumentException {
    int off;
    String portStr = null, ttlStr = null;
    if (session != null && session.length() > 0) {
    while (session.length() > 1 && session.charAt(0) == '/')
    session = session.substring(1);
    // Now see if there's a addr specified.
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    addr = session;
    } else {
    addr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a port specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    portStr = session;
    } else {
    portStr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a ttl specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    ttlStr = session;
    } else {
    ttlStr = session.substring(0, off);
    if (addr == null)
    throw new IllegalArgumentException();
    if (portStr != null) {
    try {
    Integer integer = Integer.valueOf(portStr);
    if (integer != null)
    port = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    } else
    throw new IllegalArgumentException();
    if (ttlStr != null) {
    try {
    Integer integer = Integer.valueOf(ttlStr);
    if (integer != null)
    ttl = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    * GUI classes for the Player.
    class PlayerWindow extends Frame {
    Player player;
    ReceiveStream stream;
    PlayerWindow(Player p, ReceiveStream strm) {
    player = p;
    stream = strm;
    public void initialize() {
    add(new PlayerPanel(player));
    public void close() {
    player.close();
    setVisible(false);
    dispose();
    public void addNotify() {
    super.addNotify();
    pack();
    * GUI classes for the Player.
    class PlayerPanel extends Panel {
    Component vc, cc;
    PlayerPanel(Player p) {
    setLayout(new BorderLayout());
    if ((vc = p.getVisualComponent()) != null)
    add("Center", vc);
    if ((cc = p.getControlPanelComponent()) != null)
    add("South", cc);
    public Dimension getPreferredSize() {
    int w = 0, h = 0;
    if (vc != null) {
    Dimension size = vc.getPreferredSize();
    w = size.width;
    h = size.height;
    if (cc != null) {
    Dimension size = cc.getPreferredSize();
    if (w == 0)
    w = size.width;
    h += size.height;
    if (w < 160)
    w = 160;
    return new Dimension(w, h);
    public void record(DataSource ds) {
    Format formats[] = new Format[1];
    formats[0] = new VideoFormat(VideoFormat.CINEPAK);
    FileTypeDescriptor outputType =
    new FileTypeDescriptor("video.x_msvideo");
    Processor p = null;
    try {
    p = Manager.createRealizedProcessor(new ProcessorModel(ds,formats,
    outputType));
    } catch (IOException e) {
    e.printStackTrace();
    } catch (NoProcessorException e) {
    e.printStackTrace();
    } catch (CannotRealizeException e) {
    e.printStackTrace();
    // get the output of the processor
    DataSource source = p.getDataOutput();
    // create a File protocol MediaLocator with the location
    // of the file to
    // which bits are to be written
    MediaLocator dest = new MediaLocator("file://vvv.mpeg");
    // create a datasink to do the file writing & open the
    // sink to make sure
    // we can write to it.
    DataSink filewriter = null;
    try {
    filewriter = Manager.createDataSink(source, dest);
    filewriter.open();
    } catch (NoDataSinkException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    } catch (SecurityException e) {
    e.printStackTrace();
    // now start the filewriter and processor
    try {
    filewriter.start();
    } catch (IOException e) {
    e.printStackTrace();
    p.start();
    try {
    Thread.sleep(10000);
    }catch(Exception e) { }
    p.close();
    filewriter.close();
    // stop and close the processor when done capturing...
    // close the datasink when EndOfStream event is received...
    public static void main(String argv[]) {
    //     if (argv.length == 0)
    //     prUsage();
    String[] a = new String[1];
    a[0] = ("192.168.0.45/4002");
    AVReceive2 avReceive = new AVReceive2(a);
    if (!avReceive.initialize()) {
    System.err.println("Failed to initialize the sessions.");
    System.exit(-1);
    // Check to see if AVReceive2 is done.
    try {
    while (!avReceive.isDone())
    Thread.sleep(1000);
    } catch (Exception e) {}
    System.err.println("Exiting AVReceive2");
    static void prUsage() {
    System.err.println("Usage: AVReceive2 <session> <session> ...");
    System.err.println(" <session>: <address>/<port>/<ttl>");
    //System.exit(0);
    }// end of AVReceive2
    so here the code. all messed up. coz i have just completed it and havent worked on interface or formatting this code properly (didnt have much time). but hope it will help. ask me if u have any questions. dont want others to have those basic problems that i had to face.

    u did a good effort for the JMF beginners i appreciate that....thanks i lot....i need you help in a project in
    which i have to connect to a d-link 950G IP camera and process that
    mpeg-4 stream (i know there are some problems in JMF and mpeg4) and show it over applet of JFrame.
    IP is 172.25.35.22
    Edited by: alchemist on Jul 16, 2008 6:09 AM

Maybe you are looking for