[Request] Importing images source code using purely C++



  • Hi im rather new to C++ programming, i would like to request some help with importing images using ONLY C++ for my game, if possible can someone help me make a quick source code or a provide a link to a step by step tutorial for importing images.

    Much obliged for any help provided =)



  • Well, your question is not very clear... What do you mean by "import image"?
    What is the internal representation of your image? What is the format of the "source image"?

    As long as you don't give enough information nobody can answer, can't they?

    As far as I know there are several classes in Qt that are dealing with images.



  • well i mean to create a custom item in QT to be used as a sprite for a game and this custom item is going to have a base png image to be used for a character for example. The format of the image is going to be png.


  • Moderators

    You might want to read into the Qt Resource System. That can be used to store files inside the binary.



  • Hi,
    Check about QGraphicsPixmapItem and QPixmap classes, it should be a good begin!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.