Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    470
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Accessing the contents of an image's source

    Is it possible to access the actual data found in an image's source on the client side?

    I don't mean the "src" attribute of the IMG tag. I mean the actual image data that the browser would retrieve when it fetches the image for display.

  • #2
    New Coder
    Join Date
    Aug 2006
    Location
    Idaho
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you talking about the raw file data? Why are you trying to access it? Are you trying to alter it or something?
    .
    + Christ is the Rock - Rock On!

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    470
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Yes, the raw file data. I need to scan that for certain pieces of information when the images load before making a client side JavaScript decision. Unfortunately they can't be processed server side.

  • #4
    New Coder
    Join Date
    Aug 2006
    Location
    Idaho
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Still not sure what/why. The server will know what it is 'serving' but it would take a substantial [server side] script to even attempt to access the packeted data.

    It would help to know exactly what data you are trying to pull from the raw graphic data and for what purpose you need to access it. Right now we are just talking theory rather than practical application.
    .
    + Christ is the Rock - Rock On!

  • #5
    Regular Coder
    Join Date
    Jan 2005
    Posts
    470
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I mainly just need to check images on the client side that are displayed on the web page that come of external sources without having to download them server side and then server them up again. The checking won't be anything fancy and isn't something I couldn't do if there was some way to access the image data.

  • #6
    New Coder
    Join Date
    Aug 2006
    Location
    Idaho
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you trying to check attributes [like image file size]? If so, you will need server side code [I suggest php]. On the upload it will run your check and either complete the upload or abort it. This can get complicated depending on what you are trying to do. Google for graphic based php script snippits and see if you can locate a starting point.
    .
    + Christ is the Rock - Rock On!


  •  

    Posting Permissions

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