java - Changing the colors on a image -


I am trying to create a program that allows me to change the colors of an image, an interface through color, then decided in the interface, you choose the color, by clicking on the image problem that:

once the Parekspoint method to change me again image fill pixels Requires the same as the selected pixel on which the pixel was clicked and The reference is the pixel, but click points in tramsform image 2, and color is the color color. The transport point method should be portrayed if the reference is similar to the color of the pixel and afterwards send their paint points to the North, South, Est and West, then it (if any) calls itself through a recursive method. is.

Because each method call stack requires this method of changing the image, it is not possible for areas with pixels where you need more than the current stack.

  public void Tronsformment was 2 (Click Point Point, Color color) {// Dispresrs O Canal Alpha (Tronspriansia) in Tuds course Int paint as the use of Rngor RGB = clear Elfa Chinal (paint collar. ATRGB) ()); Int deltaWidth = (imageWidth - label.getWidth ()) / 2; Int deltaahit = (image hight - label.gatehit ()) / 2; Int x = Clicked Point.x + Delta Wide; Int y = Clicked Point.y + deltaHeight; Transform point (x, y, gate pixel collier (click point), paint collar rgb); } Private Int pixel Coleyr (Clicked Point pt) {// Difrasr O Canal Alpha (Tronspriansia) AR Tuds course Upyogijhad Int pixel collar = Clear Alpha Chainal (Image. Aitijiarji (Click Point X clicked Pointkai)); Return pixel color; } Private Whoid Transport Point (Intex X, Int Rifolr, Inti Picture Coler RGB) {// Difortr nozzles alpha (Tronspriansia) to Tours clear core Upyogijds Int pixel RGB = alpha Chainal (Image. Jitiarjibi (x, y)); // TODO ... image.setRGB (x, y, paintColorRGB); // TODO ...}  

As you've found, a recurring implementation stack Overflow Instead you should try a queue implementation


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -