<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: flip code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 12 Oct 2008 16:15:44 GMT</pubDate>
    <description>DZone Snippets: flip code</description>
    <item>
      <title>Matlab - DoubleFlip Image</title>
      <link>http://snippets.dzone.com/posts/show/2951</link>
      <description>// Flip Width &amp; Height&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function flipIMG=DoubleFlip(img)&lt;br /&gt;&lt;br /&gt;    tic&lt;br /&gt;&lt;br /&gt;    flipIMG = img([1:end/2, end/2:-1:1], [1:end/2, end/2:-1:1], :);&lt;br /&gt;&lt;br /&gt;    toc&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 02 Nov 2006 01:08:50 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2951</guid>
      <author>whitetiger ()</author>
    </item>
    <item>
      <title>Java - HalfFlipH / HalfFlipW</title>
      <link>http://snippets.dzone.com/posts/show/2935</link>
      <description>&lt;code&gt;&lt;br /&gt;	public BufferedImage halfFlipW(BufferedImage bi)&lt;br /&gt;	{&lt;br /&gt;		int width = bi.getWidth();&lt;br /&gt;		int height = bi.getHeight();&lt;br /&gt;		&lt;br /&gt;		BufferedImage biFlip = new BufferedImage(width, height, bi.getType());&lt;br /&gt;		&lt;br /&gt;		for(int i=0; i&lt;width; i++)&lt;br /&gt;			for(int j=0; j&lt;height/2; j++)&lt;br /&gt;			{&lt;br /&gt;				biFlip.setRGB(i, j, bi.getRGB(i, j));&lt;br /&gt;				biFlip.setRGB(i, (height-1)-j, bi.getRGB(i, j));&lt;br /&gt;			}&lt;br /&gt;		&lt;br /&gt;		return biFlip;&lt;br /&gt;	}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;	public BufferedImage halfFlipH(BufferedImage bi)&lt;br /&gt;	{&lt;br /&gt;		int width = bi.getWidth();&lt;br /&gt;		int height = bi.getHeight();&lt;br /&gt;		&lt;br /&gt;		BufferedImage biFlip = new BufferedImage(width, height, bi.getType());&lt;br /&gt;		&lt;br /&gt;		for(int i=0; i&lt;width/2; i++)&lt;br /&gt;			for(int j=0; j&lt;height; j++)&lt;br /&gt;			{&lt;br /&gt;				biFlip.setRGB(i, j, bi.getRGB(i, j));&lt;br /&gt;				biFlip.setRGB((width-1)-i, j, bi.getRGB(i, j));&lt;br /&gt;			}&lt;br /&gt;		&lt;br /&gt;		return biFlip;&lt;br /&gt;	}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 31 Oct 2006 04:57:12 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2935</guid>
      <author>whitetiger ()</author>
    </item>
    <item>
      <title>Java - FlipH / FlipW</title>
      <link>http://snippets.dzone.com/posts/show/2934</link>
      <description>&lt;code&gt;&lt;br /&gt;public BufferedImage flipH(BufferedImage bi)&lt;br /&gt;	{&lt;br /&gt;		int width = bi.getWidth();&lt;br /&gt;		int height = bi.getHeight();&lt;br /&gt;		&lt;br /&gt;		BufferedImage biFlip = new BufferedImage(width, height, bi.getType());&lt;br /&gt;		&lt;br /&gt;		for(int i=0; i&lt;width; i++)&lt;br /&gt;			for(int j=0; j&lt;height; j++)&lt;br /&gt;				biFlip.setRGB((width-1)-i, j, bi.getRGB(i, j));&lt;br /&gt;		&lt;br /&gt;		return biFlip;&lt;br /&gt;	}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;	&lt;br /&gt;	public BufferedImage flipW(BufferedImage bi)&lt;br /&gt;	{&lt;br /&gt;		int width = bi.getWidth();&lt;br /&gt;		int height = bi.getHeight();&lt;br /&gt;		&lt;br /&gt;		BufferedImage biFlip = new BufferedImage(width, height, bi.getType());&lt;br /&gt;		&lt;br /&gt;		for(int i=0; i&lt;width; i++)&lt;br /&gt;			for(int j=0; j&lt;height; j++)&lt;br /&gt;				biFlip.setRGB(i, (height-1)-j, bi.getRGB(i, j));&lt;br /&gt;		&lt;br /&gt;		return biFlip;&lt;br /&gt;	}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 31 Oct 2006 04:49:26 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2934</guid>
      <author>whitetiger ()</author>
    </item>
  </channel>
</rss>
