Results 1 to 16 of 16

Thread: Storage and View -> imageViewer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2008
    Posts
    40
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Storage and View -> imageViewer

    hm... the app has a minimal size, but no maximum. so the image should be scaled. AFAIR the example does that.

    I haven't used QVariant so far...
    Qt Code:
    1. QFile *file("./image1.jpg");
    2. QPixmap *map(QPixmap::fromImage(file));
    3. QByteArray bytes;
    4. QBuffer buffer(&bytes);
    5. buffer.open(QIODevice::WriteOnly);
    6. map->save(&buffer, "JPG");
    7. QVariant variant(bytes);
    To copy to clipboard, switch view to plain text mode 
    and then put it via "INSERT INTO ....." into the DB?

    If i put some hundrets of Images in the rcc's, i'll have a binary which is about 500MBs at size, am i right?

    Edit: Oh, i forgot, another guy wants to write a single imageviewer in Java, so he should at least know if there is an easy way to read the data in a Qt-Free Java environment
    Last edited by C167; 5th January 2008 at 16:54.

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.