Giter Site home page Giter Site logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
Once again, thank you for your suggestion.

I'm trying to think of an exact use case for this function.
Perhaps, passing a pre-tranformed `Graphics2D` object to which the thumbnail 
should be drawn on?

Internally, the smallest unit used for processing is a `BufferedImage` object, 
and any drawing is done by first obtaining an `Graphics2D` object from the 
`BufferedImage` rather than passing around `Graphics` objects. (Reworking the 
internals to pass around `Graphics` objects would be a very large endeavor 
which I feel doesn't have a good return on investment.)

Therefore, a hypothetical `Builder.drawTo(Graphics g)` method would just be a 
method which internally draws the `BufferedImage` onto the given `Graphics` 
object.

If that's all that's needed, it shouldn't be too difficult to add to the 
`Builder` class, but I feel that's something that could be done just as simply 
outside of the Thumbnailator API:

  Graphics g = getGraphicsFromSomewhere();

  BufferedImage img = 
    Thumbnails.of("path/to/image")
      .size(100, 100)
      .asBufferedImage();

  g.drawImage(img, 0, 0, null);

Original comment by [email protected] on 26 Nov 2011 at 8:09

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 19, 2024
This issue has been open for more than 6 months without much interest (only a 
single star has been given), and I find it difficult to find an use case for 
this addition, so I'll be closing this issue without additional action.

Original comment by [email protected] on 9 Jun 2012 at 6:40

  • Changed state: WontFix

from thumbnailator.

Related Issues (20)

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.