Results 1 to 3 of 3

Thread: Loading Image

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Loading Image

    Hi,
    I am trying to load a tif image which has 24 bit depth. When I load using QImage or QPixmap, it always shows bit depth of 32. Even when I save this image in different location, it shows bit depth 32.

    Can anyone suggest me how to load image with it's actual bit depth??

    Thanks in advance

  2. #2
    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: Loading Image

    Have you tried QImage::convertToFormat()? QImage::Format_RGB888 looks promising.

  3. #3
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Loading Image

    Thank you Chris.

    Yes I tried this also. After conversion bit depth shows 24 bit. but after i save image to disk, saved image shows bit depth of 32.

    And above method is works only for 24 bit images. My application should load images with its original bit depth..

Similar Threads

  1. Loading an Image into QImage
    By jstippey in forum Qt Programming
    Replies: 5
    Last Post: 4th January 2011, 14:36
  2. Loading a raw image into QImage
    By Luc4 in forum Qt Programming
    Replies: 6
    Last Post: 16th May 2010, 15:20
  3. loading image from disk
    By freekill in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2010, 05:21
  4. problems loading an image .jpg
    By maider in forum Qt Programming
    Replies: 3
    Last Post: 14th December 2009, 11:57
  5. Image Loading
    By kavinsiva in forum Qt Programming
    Replies: 2
    Last Post: 11th August 2009, 08:00

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.