Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. is there any way to use Qt to downscale various kind formats of pictures?

is there any way to use Qt to downscale various kind formats of pictures?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.7k Views 3 Watching
  • 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by
    #1

    is there any way to use Qt to downscale various kind formats of pictures?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can use QPixmap::scaled() for that.

      O 1 Reply Last reply
      0
      • Chris KawaC Chris Kawa

        You can use QPixmap::scaled() for that.

        O Offline
        O Offline
        opengpu2
        wrote on last edited by
        #3

        @Chris-Kawa and i want to save the new downscaled picture to a new file...

        p3c0P 1 Reply Last reply
        0
        • O opengpu2

          @Chris-Kawa and i want to save the new downscaled picture to a new file...

          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @opengpu2 QPixmap::save() ?

          157

          1 Reply Last reply
          0
          • O Offline
            O Offline
            opengpu2
            wrote on last edited by
            #5

            thank you , i will have a try.

            1 Reply Last reply
            0
            • O Offline
              O Offline
              opengpu2
              wrote on last edited by
              #6

              is QImage::scaledToWidth & scaledToHeight better?

              1 Reply Last reply
              0
              • Chris KawaC Offline
                Chris KawaC Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by Chris Kawa
                #7

                Better for what? They do different things. scaledTo* preserves aspect ratio while scaled lets you specify arbitrary size.

                1 Reply Last reply
                0

                • Login

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