Results 1 to 6 of 6
  1. #1
    dudejonne is offline Member
    Join Date
    Oct 2009
    Posts
    56
    Rep Power
    0

    Exclamation Saving image to sever.

    I have a signed jar file. In it is a class file called image.class.

    The image.class creates a bufferedImage called bimg. Now I want to store bimg on my server as image1.jpg so I can do this: www.mywebsite.com/image1.jpg and I can view the image.

    I've tried:
    ImageIO.write(bufferedImage,"jpg",file);

    But it only works local. And not if I add the jar into a html page.

    Could someone olease help me on this one?

    Thanks!

  2. #2
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    I believe the proper way to go about this is to save the image into a database and have you website link to that item in the database.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

  3. #3
    dudejonne is offline Member
    Join Date
    Oct 2009
    Posts
    56
    Rep Power
    0

    Default

    SQL database? I've read some thingds about that.

  4. #4
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    Again I am not positive in the slightest if this is the proper way to go about this but from what I know about web design it should at least work(probably better ways but I don't know). Perhaps someone else can be of more use.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

  5. #5
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    Storing it in a database would work, but it seems you would take a performance hit because you would have to pull the image from the database every single page request instead of retrieving the image from the clients browser image cache.
    My Hobby Project: LegacyClone

  6. #6
    dudejonne is offline Member
    Join Date
    Oct 2009
    Posts
    56
    Rep Power
    0

Similar Threads

  1. [SOLVED] Image drawing, saving
    By Goseph in forum Java 2D
    Replies: 2
    Last Post: 12-21-2008, 07:36 PM
  2. Saving data...?
    By easyRyder in forum New To Java
    Replies: 8
    Last Post: 07-15-2008, 03:14 AM
  3. Replies: 0
    Last Post: 01-08-2008, 05:29 PM
  4. regarding client -sever
    By gobinathm in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2007, 05:59 AM
  5. Saving Variables
    By Fish in forum New To Java
    Replies: 6
    Last Post: 06-25-2007, 08:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •