@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> if i can compare 64 pixels at once
<0> that'd be ideal
<1> err... read it 1 bit at a time store it on variable do it 64 times then do the same with the second image then compare
<2> SmartOne: why would that be ideal?
<0> wouldn't it be faster to read in 64 bits at once instead of 1 bit at a time 64 times?
<2> SmartOne: have you solved it by comparing pixel by pixel?
<2> SmartOne: if you have, and it is too slow, i agree with performance tuning.
<0> i didn't really solve it, people did
<1> <0> wouldn't it be faster to read in 64 bits at once instead of 1 bit at a time 64 times? << errr.. reading it 64bits at a time is the same as reading it 1bit at a time doing it 64 times
<2> SmartOne: so you have foreign code which you want to improve?
<0> really?
<0> no, no code yet



<2> SmartOne: so we have nothing to work with, just vagueness?
<0> http://www.studentsofgamedesign.com/VBTutorials/PixelPerfectCollision.html
<0> well, that's the site i went to to figure out how to do pixel collission, but at the end it states to check the image for 1 pixel at a time for a white pixel
<2> SmartOne: doesn't it make more sense to first solve it on a pixel wise basis, to then change that working code?
<0> yeah
<0> at the end of that website i put it says that the final output image has to be searched through for white pixels
<0> i'd rather not search 1 pixel at a time but rather be able to search entire rows of pixels at once
<0> read in 64 bits of the image instead of 1 bit
<2> SmartOne: yes, that may be faster.
<0> wouldn't that make it faster?
<2> :)
<0> that's part of it, if it matters, the big question is, how do i read in more than 1 pixel at a time?
<0> how can i read in the binary value of this image 64 bits at once
<2> SmartOne: how do you read in 1 pixel at a time?
<0> their suggestion is to do a getPixel or something
<2> SmartOne: maybe get the raw image data as a byte[], int[], long[] or so array. then you can grab the first values, apply AND to them and see if the result is > 0.
<0> yes, that's exactly what i wanna do
<0> get the raw image data
<2> or, to meet the abstract level of your request: get the data in the appropriate chunks and compare on a per byte or so basis.
<0> man, this is tough stuff and it's only 2D so far
<2> so you are not really asking about how to compare images or how to get 64 pixels at once, but rather how to get the raw pixel data of Image objects?
<0> i can't imagine how 3D collision detection is
<0> yah, i just wanna read in the image 64 bits at once
<0> now, to throw something else out there, if i read the raw data will it just be all the pixels being read in or am i gonna run into some other messy stuff in all this?
<3> have you even decided if you're using swing or awt yet? lol
<0> no, not yet
<4> hey :)
<0> i gotta know what i need to do first before throwing code out there
<0> that's how i was told to program
<0> write on paper in pseudocode, then bring it to the screen
<2> SmartOne: come back with actual code, good luck.
<0> i will
<0> i'll make the long way collission detection first
<0> then see if it can be improved
<3> ah i was wondering since you were posting a vb tutorial
<3> maybe i should of asked if you had decided on a prog lang
<2> SmartOne: cool, that will make discussing changes and solutions more practical i think.
<0> java of course
<0> i love java
<0> i just used that page as an example on how the process works
<0> man, i gotta learn how to control images in java now



<0> not to start any kinda flame war or whatever, should i use swing or awt?
<3> SmartOne have a look at the api
<0> the api for Java 5.0 is huge
<0> i use it constantly
<0> but still no idea which is considered to be "better"
<0> i'll figure it out, no worries
<0> im out, thanks for the help guys, later
<2> what a funk, i spent 1 hour chasing a crash which i didn't cause, pulling my changes out in the process, just great mr.clackwell. ;|
<2> see you later
<5> I'm planning to implement a hierarchical tree navigation system using Java. I've been researching tree tag libraries - I was wondering if anyone here had any suggestions?
<3> @@
<3> https://taglibrarydoc.dev.java.net/
<6> Hm.. does Sun provide a NumberFormat implementation which will format an integer in base 2, preferably with units of "KiB, MiB, GiB", etc?
<7> Negative.
<6> Dammit
<7> None that I'm aware of anyway!
<6> I can't see one
<6> Your search - numberformat "arbitrary base" - did not match any documents.
<6> heh
<6> I think that's Google telling me to call it a day
<6> Wed May 17 19:38:34 BST 2006
<7> Well, you might try Jakarta Commons Math package.
<7> There's a muriad of stuff in there - maybe something you could use.
<6> I'm doing backup charts
<7> myriad, excuse me :)
<6> The y-axis is "backup size". Currently I'm using scientific notation with one decimal place in a spreadsheet
<7> Ahh
<8> meh.. httpclient 2.0.2 works, 3.0 breaks horribly..
<6> The "major units" are set to a suitable power of two
<8> guess I'll have to p*** on the upgrade for a bit then
<6> So the lines are in the right place, just that the axis labels are like "2.1" instead of "2" :)
<6> heh, "FractionFormat" and "ProperFractionFormat"
<3> man i hate when they tell you to integrate new code into other people's crap
<3> they they're all yeah that ought to take about a week
<3> then of course you have to send your tables changes to the dba which takes 2 days and then user services which is about another 3 days
<3> that leaves ya about 2 hours to code
<3> sure no problem
<3> then review time comes and they're all let's see ...you didn't not hit any of your complete dates
<3> really? heh..they weren't MY complete dates
<9> anyone knows how can I round a number in two decimal places0
<9> ?
<7> Math.round will round a floating point number to the nearest integer.
<9> but I don't want an integer
<9> but a double like 99.12
<7> Then multiply by 100, round, and divide result by 100.
<9> yeah I think I've done something like that
<9> int decimalPlace = 2;
<9> double power_of_ten = 1;
<9> while (decimalPlace-- > 0)
<9> power_of_ten *= 10.0;
<9> return Math.round(value * power_of_ten) / power_of_ten;
<9> c ya \o


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

kernel panic no limit found
my cat drinks fromt the faucet
hotmail webcam england
#chatzone
#c++
#squid
fuck lolt
#linux
#linux
#php



Home  |  disclaimer  |  contact  |  submit quotes