Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: adding mouse control to game
Post: RE: adding mouse control to game
Hi,
thank you for answering...
I think, I got it now...
Because there were problems, if self.rect.centerx = max(self.xmin, min(self.xmax, xpos)) is inside the function "spaceship.update()"
I put it... |
|
flash77 |
Game Development |
2 |
340 |
Apr-08-2024, 06:52 PM |
|
|
Thread: adding mouse control to game
Post: adding mouse control to game
Hi,
I'm trying to add mouse control for the character in a Space Invaders clone whose code I found online.
Determining the X position of the mouse pointer (event.pos[0]) works, in line 278 I pass this... |
|
flash77 |
Game Development |
2 |
340 |
Apr-06-2024, 06:39 PM |
|
|
Thread: append str to list in dataclass
Post: RE: append str to list in dataclass
|
flash77 |
General Coding Help |
6 |
589 |
Mar-14-2024, 06:26 PM |
|
|
Thread: append str to list in dataclass
Post: RE: append str to list in dataclass
(Mar-14-2024, 04:41 PM)deanhystad Wrote: A dictionary will not save information after the program ends. To do that you need files. Either a file you write yourself, or a file that is maintained by... |
|
flash77 |
General Coding Help |
6 |
589 |
Mar-14-2024, 04:56 PM |
|
|
Thread: append str to list in dataclass
Post: RE: append str to list in dataclass
Dear deanhystad,
thanks a lot for your answer!
Second and third example works perfectly (for the first an error occurs...)
But I'm looking to be able to store strings in a list and keep it when the... |
|
flash77 |
General Coding Help |
6 |
589 |
Mar-14-2024, 04:22 PM |
|
|
Thread: append str to list in dataclass
Post: append str to list in dataclass
Dear community,
I'm trying to append str to a list, which is in a dataclass.
I'm totally new to dataclasses.
I used to use a textfile for storing strings.
Then I read about dataclasses for storing d... |
|
flash77 |
General Coding Help |
6 |
589 |
Mar-14-2024, 03:41 PM |
|
|
Thread: Count image's colors very fast
Post: RE: Count image's colors very fast
Dear deanhystad,
I just wanted to let you know that our work on counting the pixels in an image to determine the majority of pixels of the same color (PrimaryColorRatio) was not in vain.
First, I we... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Mar-05-2024, 04:38 PM |
|
|
Thread: main GUI is not shown
Post: RE: main GUI is not shown
Hi,
I found the error...
Beside the error Axel_Erfurt mentioned, in PyCharm there was a wrong scriptpath adjusted... |
|
flash77 |
GUI |
3 |
548 |
Feb-20-2024, 05:27 PM |
|
|
Thread: main GUI is not shown
Post: RE: main GUI is not shown
Hi Axel_Erfurt,
So far I haven't found the reason why the main GUI doesn't appear...
But thank you very much for the answer anyway! |
|
flash77 |
GUI |
3 |
548 |
Feb-19-2024, 06:45 PM |
|
|
Thread: main GUI is not shown
Post: main GUI is not shown
Dear community,
the main GUI of my application is not shown - I don't know why...
I'm using PyCharm, but the debugger doesn't start. (In the past I was able to set breakpoints and check for errors...... |
|
flash77 |
GUI |
3 |
548 |
Feb-18-2024, 07:09 AM |
|
|
Thread: Count image's colors very fast
Post: RE: Count image's colors very fast
Dear Pedroski55,
dear deanhystad!
Thank you for your excellent answers!
Unfortunately, it wasn't at all clear to me that PDF documents already "know" whether they contain text, for example.
And that... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Feb-08-2024, 06:18 PM |
|
|
Thread: Count image's colors very fast
Post: RE: Count image's colors very fast
Hi,
thanks for your answers.
And thanks, Pedroski55, for your code example!
I would like to have a more friendly tone - I'm not so experienced and I'm trying to get better...
I thought examining p... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Feb-06-2024, 08:36 PM |
|
|
Thread: Count image's colors very fast
Post: RE: Count image's colors very fast
Hi deanhystad,
hi Pedroski55,
thanks a lot for your answers!
I experimented a bit...
There is the function on which deanhystad helped me a lot ("primary_color_ratio()") - it takes 1,634 seconds to ... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Feb-05-2024, 07:32 PM |
|
|
Thread: Count image's colors very fast
Post: RE: Count image's colors very fast
Dear deanhystad, dear Pedroski55,
thanks a lot for your answers!
In the meantime I read the information about maxcolors too...
Because I have to analyze pictures with lots of colors I will go back ... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Feb-04-2024, 05:56 PM |
|
|
Thread: Count image's colors very fast
Post: Count image's colors very fast
Dear community,
I found a code at stackoverflow which shall get the image's color count very fast.
https://stackoverflow.com/questions/7139...n-an-image
I'm trying to get the second function working... |
|
flash77 |
General Coding Help |
18 |
1,704 |
Feb-03-2024, 06:30 PM |
|
|
Thread: identify not white pixels in bmp
Post: RE: identify not white pixels in bmp
Dear community,
using quantization (reduce to 2 colors) could be perhaps a way to go (but I'm not sure if it is the right way).
I had to switch some lines:
This should be better:
"filled_ratio" de... |
|
flash77 |
General Coding Help |
17 |
2,652 |
Nov-10-2023, 09:21 PM |
|
|
Thread: identify not white pixels in bmp
Post: RE: identify not white pixels in bmp
Dear deanhystad,
I was a bit confused and tried a lot, because the detection of the right primary color ratio wasn't working properly...
(And, among other things, I tried to use Counter instead of nu... |
|
flash77 |
General Coding Help |
17 |
2,652 |
Oct-09-2023, 06:18 AM |
|
|
Thread: identify not white pixels in bmp
Post: RE: identify not white pixels in bmp
Hi,
sorry for not spotting the error, I didn't expect it there and overread it.
Unfortunately I don't know how to deal with a grainy scan. Testing "clean" color bitmaps worked fine.
Perhaps it is po... |
|
flash77 |
General Coding Help |
17 |
2,652 |
Oct-08-2023, 09:21 PM |
|
|
Thread: identify not white pixels in bmp
Post: RE: identify not white pixels in bmp
Hi,
primColorRatio = 0.08355574985044406
filled_ratio = 0.916444250149556
I scanned the attached text... |
|
flash77 |
General Coding Help |
17 |
2,652 |
Oct-07-2023, 07:48 PM |
|
|
Thread: identify not white pixels in bmp
Post: RE: identify not white pixels in bmp
Dear deanhystad, thank you very much for your help!!
Here I am sending what I made from your information.
I scanned a DIN A4 page (with part of the "hangerfinder's" code) and am now a bit surprised by... |
|
flash77 |
General Coding Help |
17 |
2,652 |
Oct-07-2023, 04:58 PM |