I would like to combine 2 equal dimension PImages into one PImage by set() -ing one of the images directly on top of another
The problem with this is that if the top image has transparency, the set() function will replace all the transparent pixels with the colour white when set() -ing it rather than skip the transparent pixels.
How can I solve this problem? I have tried using the blend() function but it didn't work.
What would be faster? A 2D array with 26 'columns' and 18 'rows'? Or An ArrayList with 26 bins and each bin is an Arraylist of 18 bins? Keep in mind that these arraylists will have the values in their bins shift position frequently.
I have some code that loads a 512 by 512 .png. Each 32 * 32 section of the png is a separate tile and I wrote some code that reads an int 2D array and prints the tile it points to. Here's an example of my code:
So basically, I'm drawing 16 rows of tiles with each line drawing a different tile 16 times. However, my program is really slow! What am I doing wrong? (I know this example is full speed, but I'm doing the exact same thing except on a very slightly larger scale and I get half my normal framerate)
With this code, whenever I highlight a text option, it brightens up (via the fill()). However, I cannot get sound to play. It sometimes play when it's supposed to, and it sometimes doesn't. What am I doing wrong?
Simply put, is there a function that'll change the text that appears in the title bar of the sketch window? Right now, it matches my .pde file name. However, I want to be able to change it without changing the name of my file.
I'll keep this short. Let's say I'm trying to print two images on top of each other:
PImage peach = loadimage("peach.png");
PImage grey = loadimage("grey.png");
image(peach, 0, 0, 256, 256);
//Next image to print on top of previous one
image(grey, 0, 0, 256, 256);
With my current code, all you would see is the grey box (since the peach gets overlapped). However, in photoshop, if you put the grey layer on top of the peach layer and turn the blend mode of the grey layer to 'luminosity', you get this result:
My question is, how can I produce that^^ same result in processing? Please breakdown your explanation.