Results 1 to 6 of 6
  1. #1
    Agent Mulder is offline Member
    Join Date
    Jul 2013
    Posts
    4
    Rep Power
    0

    Default BufferedImage, copy parts to itself

    Hello fellow programmers,

    I have a BufferedImage with a given size. Now I paint to one quarter of it with a complicated algorithm. This one quarter I want to copy to the other three quarters of the BufferedImage, so that the same image is depicted 4 times on the BufferedImage.

    Is it save to use BufferedImage this way?

    -X- Agent Mulder

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: BufferedImage, copy parts to itself

    Moved from Advanced Java. Nothing advanced about the question either.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: BufferedImage, copy parts to itself

    Quote Originally Posted by Agent Mulder View Post
    Is it save to use BufferedImage this way?
    I presume you mean 'safe.'

    What exactly do you consider safe and unsafe?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    Agent Mulder is offline Member
    Join Date
    Jul 2013
    Posts
    4
    Rep Power
    0

    Default Re: BufferedImage, copy parts to itself

    I mean 'safe' of course. Thank you for that.

    When I copy a rectangle with coordinates 0, 0 (upper left corner), 100, 100 (lower right corner) to 50, 50, 150, 150, what will the result be?

    And when there is no overlap. Will it produce the desired outcome?

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: BufferedImage, copy parts to itself

    Quote Originally Posted by Agent Mulder View Post
    When I copy a rectangle with coordinates 0, 0 (upper left corner), 100, 100 (lower right corner) to 50, 50, 150, 150, what will the result be?
    Depends what you mean by copy, in terms of Java code.

    And when there is no overlap. Will it produce the desired outcome?
    Depends on what outcome exactly you desire.

    To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that illustrates your process, and describe any problem, real or anticipated.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,358
    Rep Power
    6

    Default Re: BufferedImage, copy parts to itself

    Quote Originally Posted by Agent Mulder View Post
    When I copy a rectangle with coordinates 0, 0 (upper left corner), 100, 100 (lower right corner) to 50, 50, 150, 150, what will the result be?
    I don't get it. Just try it! Your computer is not going to blow up you know.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Copy Constructor with Shallow Copy
    By Wnt2bsleepin in forum New To Java
    Replies: 1
    Last Post: 04-11-2012, 01:42 AM
  2. Serializing parts of a form
    By lhbdan in forum New To Java
    Replies: 1
    Last Post: 03-18-2012, 10:44 PM
  3. What parts of Java do you dislike and why?
    By Petr in forum Advanced Java
    Replies: 5
    Last Post: 11-02-2011, 05:34 PM
  4. Replies: 0
    Last Post: 09-12-2011, 02:06 PM
  5. several threads for different parts
    By Itun in forum AWT / Swing
    Replies: 2
    Last Post: 03-21-2011, 12:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •