Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Mirror an image Date: Tue, 01 Apr 2014 11:15:46 -0400 Organization: A noiseless patient Spider Lines: 15 Message-ID: References: <2299213c-18fc-4e55-ab39-22dce863b255@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 1 Apr 2014 15:17:58 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6b9e92482af47766954d85fb77d372f5"; logging-data="32286"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4N/7ZZbChcEIQAQqL39+INeeOy/tesfI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 In-Reply-To: Cancel-Lock: sha1:Emqh7CCu9fE0hLbmEIFGWDpAagw= Xref: csiph.com comp.lang.java.programmer:27932 On 04/01/2014 11:09 AM, Jeff Higgins wrote: > On 04/01/2014 10:44 AM, pgmbento93@gmail.com wrote: >> hi, i was confronted with this problem. i was given a code where i >> have to mirror an image at the middle. so the image needs to be >> divided and then i have to mirror the image. this is the code: > > Use BufferedImage.createGraphics() > and then Graphics2D.scale(x,y) to flip the image. > No need for the getRGB loop. > > See the 2D Graphics trail in the Java Tutorials. Specifically: