Results 1 to 2 of 2

Thread: Image processing with using QByteArray

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2015
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    3

    Default Image processing with using QByteArray

    Hi all.
    i have to process image in Qt, and i want do it with using qbytearray. I know how to convert QPixmap to QByteArray. For example:
    QPixmap pixmap = OriginalImg.copy(0,0,x,y);
    QByteArray ba;
    QBuffer buffer(&ba);
    buffer.open(QIODevice::WriteOnly);
    pixmap.save(&buffer, "PNG");

    PNG is a compressed format, so if the size of pixmap is 860x860, the size of ba is only 128518 (not 860*860*4). And i don't know how to change the color of pixel(i,j) on image using qbytearray ba. Can anyone teach me how to achieve it.
    thanks
    Last edited by loading...; 19th January 2015 at 08:56.

Similar Threads

  1. image processing with qtopengl
    By sisilet in forum Qt Programming
    Replies: 1
    Last Post: 10th June 2010, 21:42
  2. image processing
    By IRON_MAN in forum Qt Programming
    Replies: 4
    Last Post: 18th November 2009, 13:37
  3. QByteArray processing (seeking equivalent QT code)
    By pdoria in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2009, 09:40
  4. Image processing
    By NicNac in forum Newbie
    Replies: 25
    Last Post: 2nd November 2008, 10:05
  5. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 18:15

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
  •  
Qt is a trademark of The Qt Company.