Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. [Request] Importing images source code using purely C++
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Game Development
5 Posts 4 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deliriousmindz
    wrote on 7 Oct 2011, 03:48 last edited by
    #1

    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 =)

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JohanSolo
      wrote on 7 Oct 2011, 05:55 last edited by
      #2

      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.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0
      • D Offline
        D Offline
        deliriousmindz
        wrote on 7 Oct 2011, 06:19 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 7 Oct 2011, 08:01 last edited by
          #4

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

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tomato
            wrote on 7 Oct 2011, 12:27 last edited by
            #5

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

            お前はもう死んでいる

            1 Reply Last reply
            0

            4/5

            7 Oct 2011, 08:01

            • Login

            • Login or register to search.
            4 out of 5
            • First post
              4/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved