Search found 333 matches

by Mole-chan
Mon May 18, 2015 10:43 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

What is not working? What color can't you find? I toyed with these functions a bit, they are slow but they seem to be working: init python: class Testing(object): def __init__(self, img): self.img_size = renpy.image_size(img) self.img = renpy.load_surface(img) self.color = None def get_color(self, ...
by Mole-chan
Sat May 16, 2015 5:49 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

Hey, just seeing if there's been any leads on why this isn't working. ^^;;;
by Mole-chan
Wed May 13, 2015 12:45 am
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

Yup. Mine found the color. Can you try with some other test image other than c.png (preferably with less blank space) and see if they all return the same output? EDIT: Alright, now it's not working for me too (when I use the c.png image). I swore it was working for me before. It is still working pe...
by Mole-chan
Mon May 11, 2015 11:31 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

Just tested it out and it's working. You were seeing all (255, 255, 255, 255) because the test image you were using had lost of empty/white space. Add this if dsf != (255, 255, 255, 255) or dsf != (255, 255, 255, 0) or dsf != (0, 0, 0, 0): print dsf under dsf = self.image... That would make sense. ...
by Mole-chan
Mon May 11, 2015 6:48 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

I'm just going to leave what I'm working on here. Maybe it's the image, or maybe it's just some weird issue on my end. I don't know. But I don't know how to explain all the ways it's not working.
The relevent code is in "assets.rpy".
by Mole-chan
Mon May 11, 2015 5:43 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

It's working perfectly fine for me. Ok, I dinged around with it a bit and it looks like the error is because my image is passed in, while yours is built into the method as a default? It makes no sense, but switching them around did cause the image to be read at least somewhat correctly. Still not w...
by Mole-chan
Mon May 11, 2015 5:01 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

DragoonHP wrote:It found the coloured pixel, believe me. The dimension of the image was 660*330
It did seem to work...But if I try any other color (even ones that are already present in the image and require no change), it goes through the whole image and doesn't recognize it.
I'm not sure what is going on.
by Mole-chan
Mon May 11, 2015 4:29 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

Re: Reading RGB value of single pixel of image

importing pygame works perfectly for me. Really? That's odd.Are you sure? I don't know the dimensions of the image you used, so I don't know if it actually found the colored pixel. I'd suggest using: renpy.load_surface(im) rather than pygame.image.load(im).convert() I did make this change, and the ...
by Mole-chan
Mon May 11, 2015 2:34 am
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 2698

SOLVED:Reading RGB value of single pixel of image

Hello, I'm sorry for asking such an odd question. I thought I had it more or less worked out utilizing pygame, but I've run into some errors. I want to go through an image and discern whether each pixel matches a pre-defined color. Once the color is found, the loop will break and return the coordina...
by Mole-chan
Mon Apr 20, 2015 11:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 705

Re: Pass ATL Positions to LiveComposite

Hello? ^^;; I'm still having the animation timing issue, and would really appreciate some input.
by Mole-chan
Wed Apr 15, 2015 1:33 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 705

Re: Pass ATL Positions to LiveComposite

You can't do it that way. What you have to do is to create a Fixed and position the stuff inside it. image cadfael little_smile = Fixed( "cadfael_base normal", At("cadfael_eyes normal", cad_anim_default), At("cadfael_mouth smile", cat_anim_default), xysize=(452, 720)) ...
by Mole-chan
Sun Apr 12, 2015 7:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 705

Pass ATL Positions to LiveComposite

Hello, I am wondering how one would pass ATL positions into a portion of a LiveComposite displayable instead of X,Y coordinates. Currently, I am trying this. But it throws a 'TypeError: 'ATLTransform' object is not iterable' error. image cadfael little_smile = LiveComposite((452, 720), (0, 0), "...
by Mole-chan
Mon Mar 16, 2015 9:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Transform doesn't change according to persistent
Replies: 3
Views: 787

Re: Transform doesn't change according to persistent

Color us both surprised! I was just seeing if it even would work to avoid extra loading. Looks like it did. And while the DynamicDisplayable makes sense, I got an error during implementation. This is most likely my mistake. I'm sorry, but an uncaught exception occurred. While running game code: File...
by Mole-chan
Sun Mar 15, 2015 8:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Transform doesn't change according to persistent
Replies: 3
Views: 787

Transform doesn't change according to persistent

Pardon the probably not so clear title with this one. There's probably some background required. Basically, what I am attempting to do is have varying levels of animation for this game, determined by a persistent value. In order to avoid having to load the large animated base, which negates the poin...