943,015 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 112
  • C++ RSS
Sep 2nd, 2010
0

video/image editing

Expand Post »
so im writing some video/image editing software and im stumped... not about the code so much cuz what im doing works fine .. im not convinced it is the most efficient use of my computer but it works.

first my code...
C++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. fstream obj ("sample.jpg", ios::in | ios::binary);
  9. fstream obj2("sample2.jpg, ios::out | ios::binary);
  10. int x, length;
  11. obj.seekg(0, ios::end);
  12. length = obj.tellg();
  13. char array[length];
  14.  
  15. obj.seekg(0, ios::beg);
  16. while(!obj.eof())
  17. {
  18.  
  19. array[x] = obj.get();
  20. obj2.put(array[x]);
  21. x++;
  22.  
  23. };
  24.  
  25. obj.close();
  26. obj2.close();
  27. }
  28.  



okay so my question is im not sure how jpg's or .mov's any image or movie extension is packed a way... i realize that it is a combination of 3 bytes.... so for black 3 characters would all have ffffff..


my question is where do i go to learn how these bits are packed away so i can manipulate them... any standard that would be published... (preferrably something simple but unlikely)

thank you
Last edited by therstonsplace; Sep 2nd, 2010 at 8:25 pm. Reason: im retarded
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
therstonsplace is offline Offline
21 posts
since Oct 2009
Sep 2nd, 2010
0
Re: video/image editing
Reputation Points: 86
Solved Threads: 43
Posting Pro
NicAx64 is offline Offline
532 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: C++ Address Book
Next Thread in C++ Forum Timeline: static cast Problem , help plz :)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC