There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.
Yes. Black is 0x000000 and white is 0xFFFFFF and red is 0xFF0000 and green is 0x00FF00 and blue is 0x0000FF.Bod MacNeil wrote:I've been reading into BufferedImage and RBG and have a question which might seem stupid. I see that we only use 3 colours - blue, green and red in an integer value. If all 3 are 255, does that mean the pixel is white? As I'm trying to find white pixels in a picture.
There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:Or maybe simpler: put your Image outside the try block.
If I may give an advice, out of my own experience :
if you have a pixel(x, y), then x is the horizontal distance, i.e. the column, and y is the vertical distance, or the row. So, if you start looping from 0 to image.height, you are talking about the rows. Therefore, it is wise to name the loop variable 'row', instead of y. That has saved me from many index out of bound errors, where I messed up the columns and the rows, and thus the width and the height!
There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.
Carey Brown wrote:Your calls to morse.put() should be put in a static initializer block. You don't want to be doing those puts over and over for each choice.
Piet Souris wrote:Hi Bod,
I'm afraid you posted your last post in the wrong topic. But can you explain the meaning of the counter values of IIRC, 32, 45 and 46? Are these white pixels always situated at these distances, even when split over more rows? But we'll done, it looks fine. And in case the message is about the location of a treasure: just send me a pm!
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|