Results 1 to 5 of 5

Thread: Overlapping binary files with QByteArray stream

  1. #1
    Join Date
    Mar 2012
    Posts
    13
    Thanks
    1
    Qt products
    Qt4

    Default Overlapping binary files with QByteArray stream

    I have two binary files, of which I have no clue about their data organization. I have them as QByteArray stream and overlap them meaning a[i]=b[i]+c[i].

    I made an attempt with

    QByteStream x,y,z
    for(k=0;k<x.size();k++){
    for(l=0;l<y.size();l++){
    if(k=l){
    z[k]=x[k]+y[l];
    z.append(z[k]);
    }
    }
    }

    I know that it was a naive attempt but couldn't do more as I have no clue about the internal data organization, all I know is they are binary. Any suggestions or help please !!

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Overlapping binary files with QByteArray stream

    And what's the question/problem?

  3. #3
    Join Date
    Mar 2012
    Posts
    13
    Thanks
    1
    Qt products
    Qt4

    Default Re: Overlapping binary files with QByteArray stream

    I have to overlap two images in binary format.

  4. #4
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Overlapping binary files with QByteArray stream

    If you don't know nothing about the images, and you can't process their headers (or there is no headers) then my guess is that you can't do it.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Overlapping binary files with QByteArray stream

    Please do not ask the same question in multiple places

Similar Threads

  1. Parsing/extracting from a binary QByteArray
    By Phlucious in forum Qt Programming
    Replies: 4
    Last Post: 2nd December 2011, 19:15
  2. About binary files & streams & buffers...
    By tonnot in forum General Programming
    Replies: 3
    Last Post: 22nd February 2011, 23:05
  3. Reading Binary Files
    By archanasubodh in forum Newbie
    Replies: 1
    Last Post: 27th February 2008, 12:31
  4. How can I read Binary files with Qt
    By geo_saleh in forum Qt Programming
    Replies: 2
    Last Post: 16th August 2007, 10:37
  5. Concatenating two binary files
    By nbkhwjm in forum Newbie
    Replies: 13
    Last Post: 23rd April 2007, 03:30

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.