2011-05-17 49 views
0

提前致谢。iphone中的波普艺术效果

我想在iphone上使用目标c,在图像上获得波普艺术效果(在Photoshop中的波普艺术效果意味着我们将获得具有不同效果的相同照片的4张照片)。其实我不知道它是否可能,如果可能的话,如何继续。如果有人知道请帮助我。

+0

至少,他接受了一些... – SmallChess 2011-05-17 05:50:55

+0

你是否设法以某种方式完成它? – Osi 2013-02-18 14:05:23

回答

0

是的,这是可能的,例如,苹果的CoreImage架构,算法应该很容易写,但harded调整:

image = loadImageFromFile("your image file"); 
popArt = createImage(/*width:*/ image.width * 2, 
        /*height:*/ image.height * 2); 

subdivisions = [ [ 0, image.width, 0, image.height ], 
       [ image.width, image.width, 0, image.height ], 
       [ 0, image.width, image.height, image.height ], 
       [ image.width, image.width, image.height, image.height ] ]; 

blendFunctions = [ boost_red, boost_blue, boost_yellow, boost_green ]; 

for(i=0;i<4;++i) { 
    fillRectangle(rectangle[i], /*dest. image:*/popArt, 
          /*source image:*/image, 
          blendFunctions[i]); 
} 
+0

感谢您的回复。但我没有得到如何实现它。你会给予更多的澄清。 – 2011-05-17 07:02:00