Open GL + Applying Brightness on the Image + Undo Brightness operation

时间:2020-12-10 19:59:50

I am working on one module of application. in this I need to perform brightness operation on the image [ I have done this using OpenGL ES ].

我正在开发一个应用程序模块。在这里我需要对图像执行亮度操作[我使用OpenGL ES完成了这一操作]。

Now I am stuck on how to revert back this brightness operation if in between user clicks "Cancel". As I am drawing on same layer for brightness operation.

现在,如果在用户点击“取消”之间,我仍然坚持如何恢复此亮度操作。因为我在同一层上绘制亮度操作。

I am new to OpenGL and might missing some basics. can anyone help me to give me some direction regarding same.

我是OpenGL的新手,可能会遗漏一些基础知识。任何人都可以帮我给我一些相同的方向。

Thanks,

谢谢,

Sagar

萨加尔

1 个解决方案

#1


0  

I have achieved this using two separate UIView. one for actual displaying and second one for OpenGL View. so whenever user clicks done I pass the UIImage from OpenGL view else on cancel shows the previous image.

我使用两个单独的UIView实现了这一点。一个用于实际显示,另一个用于OpenGL View。因此,每当用户点击完成后,我从OpenGL视图传递UIImage,否则取消显示上一张图像。

#1


0  

I have achieved this using two separate UIView. one for actual displaying and second one for OpenGL View. so whenever user clicks done I pass the UIImage from OpenGL view else on cancel shows the previous image.

我使用两个单独的UIView实现了这一点。一个用于实际显示,另一个用于OpenGL View。因此,每当用户点击完成后,我从OpenGL视图传递UIImage,否则取消显示上一张图像。