Skip to content
Snippets Groups Projects
  1. Feb 29, 2024
  2. Dec 07, 2022
  3. Oct 01, 2022
  4. Aug 26, 2021
  5. Dec 03, 2018
  6. Oct 01, 2018
  7. Mar 31, 2018
  8. Nov 04, 2017
  9. Aug 08, 2017
  10. Oct 08, 2014
    • Alexey Tourbin's avatar
      tiffload.c: fixed padding · dba33c7e
      Alexey Tourbin authored
      When image width is not a multiple of 8, trailing bits in each row
      representing a "virtual right border" are supposed to be filled with
      white.  However, due to a bug, the code never worked as expected.
      Instead, the actual image was trimmed by 0-7 pixels on the right.
      dba33c7e
  11. Oct 07, 2014
    • Alexey Tourbin's avatar
      smooth.c: better smoothing rules · 7c8114e1
      Alexey Tourbin authored
      The updated rules are still asymmetrical with respect to black/white
      pixels.  This partly has to do with morphology of character shapes and
      specifically with the fact that the outer curve of a character is longer
      than its inner/inward parts of the curve.  Thus clearing a single
      spike-like pixel on the outer part is typically okay, while turning
      a white pixel into black on the inside is less so.
      
      The updated rules actually do turn black pixels on, but only for a very
      good reason: when all its four neighbours are black.  This is the case
      in the following example, with the pixel in question denoted with "X".
      
      "              ++++     "
      "              ++X+     "
      "             ++++      "
      "            +++++      "
      "            ++++++     "
      "           +++++++     "
      "          ++++++++     "
      "          ++++++++     "
      "         +++++++++     "
      "        ++++++++++     "
      "        ++++ +++++     "
      "       ++++  +++++     "
      "      +++++  +++++     "
      "      ++++   +++++     "
      "     ++++    +++++     "
      "    ++++     +++++     "
      "   +++++     +++++     "
      "   ++++      +++++     "
      "  ++++       +++++     "
      " +++++       +++++     "
      " +++++++++++++++++++++ "
      "+++++++++++++++++++++++"
      "+++++++++++++++++++++++"
      "            ++++++     "
      "            ++++++     "
      "            ++++++     "
      "            ++++++     "
      "          +++++++++++  "
      "         +++++++++++++ "
      "         +++++++++++++ "
      "          +++     ++++ "
      
      The updated rules also handle differently black pixels with only one
      neighbour.  Previously, such pixels have been cleared unconditionally.
      This was not always the right thing to do, as demonstrated with the
      following example.  Here the black pixel denoted "X" has only one black
      neighbour.  However, it functions as a somewhat deficient "weak"
      horizontal link, and clearing the pixel will further distort the shape.
      We only check for horizontal linking when the neighbour is either on
      the left or right, and for vertical linking if the neighbour is on
      the top or bottom.  Weak diagonal linking is not taken into account.
      
      "      +++++++++         "
      "    +++++++++++++       "
      "  ++++++++++++++++      "
      "  ++++++    ++++++      "
      " +++++       ++++++     "
      " +++++        ++++++    "
      " ++++++        +++++    "
      " ++++++        +++++    "
      "  +++++        +++++    "
      "   ++++       ++++++    "
      "          ++++++++++    "
      "      ++++++++++++++    "
      "     +++++++   +++++    "
      "   X+++++      +++++    "
      " ++ +++        +++++    "
      "+++            +++++    "
      "++++           +++++    "
      "++++           +++++    "
      "++++          ++++++    "
      "++++         ++++++     "
      "+++          +++++++    "
      "+++       ++++++++++  ++"
      "+++  +++++++++ +++++++++"
      " +++++++++++    ++++++++"
      "  ++++++++       +++++  "
      "    ++            ++    "
      7c8114e1
    • Alexey Tourbin's avatar
      INSTALL: change -I. to -Iinclude · 60a40bd8
      Alexey Tourbin authored
      Also, change "-o bin/minidjvu" to "-o minidjvu", since the directory
      does not exist after checkout.  The recipe now works out of the box.
      60a40bd8
  12. May 27, 2014
  13. May 23, 2014
  14. Jan 21, 2014
Loading