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. Reduce QPixmap quality

Reduce QPixmap quality

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 607 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.
  • sonichyS Offline
    sonichyS Offline
    sonichy
    wrote on last edited by
    #1

    I am using https://github.com/ginsweater/gif-h to insert QPixmap to gif.
    https://github.com/sonichy/HTYScreenRecorder
    The GIF size is too big, is there a way to reduce QPixmap quality, but no need to save to jpg.

    https://github.com/sonichy

    jsulmJ 1 Reply Last reply
    0
    • sonichyS sonichy

      I am using https://github.com/ginsweater/gif-h to insert QPixmap to gif.
      https://github.com/sonichy/HTYScreenRecorder
      The GIF size is too big, is there a way to reduce QPixmap quality, but no need to save to jpg.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sonichy Your problem is not QPixmap as it does not have "quality" - it just contains pixel data. The problem is probably that you don't compress the GIF.
      Do you use GifWriteLzwImage to write the GIF file, it should compress it then.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      sonichyS 1 Reply Last reply
      1
      • jsulmJ jsulm

        @sonichy Your problem is not QPixmap as it does not have "quality" - it just contains pixel data. The problem is probably that you don't compress the GIF.
        Do you use GifWriteLzwImage to write the GIF file, it should compress it then.

        sonichyS Offline
        sonichyS Offline
        sonichy
        wrote on last edited by sonichy
        #3

        @jsulm GifWriteLzwImage is already called in the function of GifWriteFrame !
        https://github.com/ginsweater/gif-h/blob/master/gif.h#L813

        https://github.com/sonichy

        jsulmJ 1 Reply Last reply
        0
        • sonichyS sonichy

          @jsulm GifWriteLzwImage is already called in the function of GifWriteFrame !
          https://github.com/ginsweater/gif-h/blob/master/gif.h#L813

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @sonichy Well, then I don't know. Maybe you can specify how strong the compression should be using this library? Also you could reduce the picture size (https://doc.qt.io/qt-5/qpixmap.html#scaled).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          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