Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. dispalying/accessing image data from memory

dispalying/accessing image data from memory

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _tasleem
    wrote on last edited by
    #1

    i i had problem in accessing data from memory.i had used two method to read image file from disk one is 1.reading byte by byte or structure but this method is slow as i had to read the whole image byte by byte and it will take lot of time. 2.Through second method i m reading the whole image once not like byte by byte as method 1. i.e file.read(buffer,filesize);//reading the whole image at once. now i m displaying data from from both method method 1 give good results but when i try to display data readed in memory through second method it did not worked it show dummy data. Both these exe are seperate application.When i save the data readed through second method in file then it save and work fine.the only problem is displaying/accessing The purpose of reading from memory n displaying was that i want to confirm that bitmaps is correctaly copied in memory, and purpose of displaying through cout<< was that i m varified that both outputs are same, and if i perform the operations like changing its bits from memory then get the correct bits to change.

    Tasleem Arif

    P 1 Reply Last reply
    0
    • _ _tasleem

      i i had problem in accessing data from memory.i had used two method to read image file from disk one is 1.reading byte by byte or structure but this method is slow as i had to read the whole image byte by byte and it will take lot of time. 2.Through second method i m reading the whole image once not like byte by byte as method 1. i.e file.read(buffer,filesize);//reading the whole image at once. now i m displaying data from from both method method 1 give good results but when i try to display data readed in memory through second method it did not worked it show dummy data. Both these exe are seperate application.When i save the data readed through second method in file then it save and work fine.the only problem is displaying/accessing The purpose of reading from memory n displaying was that i want to confirm that bitmaps is correctaly copied in memory, and purpose of displaying through cout<< was that i m varified that both outputs are same, and if i perform the operations like changing its bits from memory then get the correct bits to change.

      Tasleem Arif

      P Offline
      P Offline
      priyeshtinku
      wrote on last edited by
      #2

      I thinks that read function has limit in term of number of bytes, so don't read whole image at once, but read in size of 10000-20000 bytes file.read(buffer,size) buffer=buffer+size use this way and let me know wht happens Subhash jain (Sundyne Technologies pvt. ltd.- 604,B wing,Trade world Lower parel Mumbai)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups