Git Product home page Git Product logo

Comments (4)

wrznr avatar wrznr commented on July 17, 2024

I am not sure whether changing the size of the image is actually a good idea. It invalidates the PAGE XML file (imageHeight, Coords etc.).

from format-converters.

tboenig avatar tboenig commented on July 17, 2024

Mmh, my solution

# delete draw area and save page
    if level == 'page':
        #del draw
        bordered = ImageOps.expand(pil_image, border=200, fill=(255,255,255))
        bordered.save("%s/%s_hl.png" % (out_dir,os.path.basename(src_img)), dpi=(300,300))

on the last lines.

Maybe you should look at the problem like a mathe-plot, there are already some solutions see
https://stackoverflow.com/questions/4700614/how-to-put-the-legend-out-of-the-plot

from format-converters.

wrznr avatar wrznr commented on July 17, 2024

That is an interesting approach. Still, the resulting image is not anymore compatible with the PAGE XML file. Maybe we can have an additional option for printing the region labels outside the image. Could you draw an example of the result you expect?

from format-converters.

tboenig avatar tboenig commented on July 17, 2024

Hi, here my mockup. I think that the labelling image are not must compatible with PAGE, that's not an problem. On the mockup you can also see signature-mark or catch-word region and a maginalia on the left side (border). The highest art is, that the labelling are not overlap.
https://files.gitter.im/tboenig/cFOs/mockup.png

from format-converters.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.