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. Does QImage::Format_Mono support text antialiasing?

Does QImage::Format_Mono support text antialiasing?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k Views 1 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.
  • I Offline
    I Offline
    itomakoto
    wrote on last edited by
    #1

    Hi,

    I want to generate a Format_Mono bitmap from QPainter drawing some text.
    But the result looks really bad on antialiasing(with antialiasing option enabled).
    when I tried use the ARGB32 format it looked very well.
    So does Format_Mono support text antialiasing? Is there any workaround for it?

    Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Dagal
      wrote on last edited by
      #2

      Hi itomakoto,

      QImage::Format_Mono is a 1 bit format and then antialiasing is impossible.

      Only 2 level of color...

      1 Reply Last reply
      0
      • I Offline
        I Offline
        itomakoto
        wrote on last edited by
        #3

        [quote author="Dagal" date="1373537803"]Hi itomakoto, QImage::Format_Mono is a 1 bit format and then antialiasing is impossible. Only 2 level of color... [/quote]
        Hi Dagal, thank you for the reply.
        I am so curious that actually the 1bit-map isn't 'not antialiased', it is generated with some noise pixel.
        For example, if I draw the character 'I', so ideally the pixel map should be like

        oo
        oo
        oo
        oo
        oo
        , suppose 'o' means a pixel.

        But what I got from qt is like

        oo
        oo
        ooo <-- one noise pixel
        oo
        ooo <---another one noise pixel
        oo

        ARGB32 doesn't have this issue.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Dagal
          wrote on last edited by
          #4

          antialiasing create always "noise pixels" lighter or darker color and then, you see soft lines.

          If you have a 1 bit image, you can have white and black pixels (no gray available)

          ARGB32 have the same issue but you don't see it... (16M Colors)

          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