Hi, I am using pix_draw, but my images are flipped upside down. how can I change that? (pd-0.39.2-extended-test7 on OSX) marius
Hi, Well,why don't you use [pix_texture] and then [rectangle 5.33333 4] ? It is more efficient and easier to control.
aalex
2007/3/21, marius schebella marius.schebella@gmail.com:
Hi, I am using pix_draw, but my images are flipped upside down. how can I change that? (pd-0.39.2-extended-test7 on OSX) marius
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I don't know the aspect ratios of the images I want to load... I really just need to display the images. but when I think longer about the problem, I will have to find a solution to get the aspect ratios anyway. still, for the moment a working pix_draw would help me. thnx! marius.
Alexandre Quessy wrote:
Hi, Well,why don't you use [pix_texture] and then [rectangle 5.33333 4] ? It is more efficient and easier to control.
aalex
2007/3/21, marius schebella marius.schebella@gmail.com:
Hi, I am using pix_draw, but my images are flipped upside down. how can I change that? (pd-0.39.2-extended-test7 on OSX) marius
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
I don't know the aspect ratios of the images I want to load... I really just need to display the images. but when I think longer about the problem, I will have to find a solution to get the aspect ratios anyway. still, for the moment a working pix_draw would help me.
You need to know the ratio of the output window, which is easy since you set it yourself using the 'dimen' message. For example, [rectangle 5.33 4] covers a 4:3 gemwin of any pixel dimension.
you did not understand my problem. some images have a 4:3 aspect ratio, but not all of them. some have 3:4, some have 1:2, some are squares. I cannot tell that. with the texture method all pictures, which are not 4:3 get distorted/stretched. or am I missing something? marius.
chris clepper wrote:
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
I don't know the aspect ratios of the images I want to load... I really just need to display the images. but when I think longer about the problem, I will have to find a solution to get the aspect ratios anyway. still, for the moment a working pix_draw would help me.
You need to know the ratio of the output window, which is easy since you set it yourself using the 'dimen' message. For example, [rectangle 5.33 4] covers a 4:3 gemwin of any pixel dimension.
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
you did not understand my problem. some images have a 4:3 aspect ratio, but not all of them. some have 3:4, some have 1:2, some are squares. I cannot tell that. with the texture method all pictures, which are not 4:3 get distorted/stretched. or am I missing something? marius.
pix_info will tell you the dimension of the image in pixels and you can resize surfaces based on that.
chris clepper wrote:
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
you did not understand my problem. some images have a 4:3 aspect ratio, but not all of them. some have 3:4, some have 1:2, some are squares. I cannot tell that. with the texture method all pictures, which are not 4:3 get distorted/stretched. or am I missing something? marius.
pix_info will tell you the dimension of the image in pixels and you can resize surfaces based on that.
OH! thanks, did not know that. that indeed helps a lot! marius.
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
you did not understand my problem. some images have a 4:3 aspect ratio, but not all of them. some have 3:4, some have 1:2, some are squares. I cannot tell that. with the texture method all pictures, which are not 4:3 get distorted/stretched. or am I missing something? marius.
Hello, do you know any Python? I highly recommend using Python with PIL (Python Image Library) to preprocess your images for GEM.
I actually had a similar problem for a Flash site I designed, where all things needed to be in a landscape orientation. I wrote script checks the size of an image, and converts "portrait" to "landscape" by making a new landscape image made up of a black rectangle and pasting the portrait image in the center. If you want examples of the scripts I can email some to you later.
Developing stuff like this in Python is quite easy, and dare I say, fun... especially because once you can do bread and butter image operations, you may realize that you can also write scripts to do glitchy and generative operations on your images.
~David
I am using python, but I am not an expert. I think GEM is faster for image operations, since it is hardwarebased or at least c code. and also I don't want to change my images at all, just display them correctly. the pix_info works great at the moment. I still will have a look at the possibilities with PIL. marius.
David Powers wrote:
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
you did not understand my problem. some images have a 4:3 aspect ratio, but not all of them. some have 3:4, some have 1:2, some are squares. I cannot tell that. with the texture method all pictures, which are not 4:3 get distorted/stretched. or am I missing something? marius.
Hello, do you know any Python? I highly recommend using Python with PIL (Python Image Library) to preprocess your images for GEM.
I actually had a similar problem for a Flash site I designed, where all things needed to be in a landscape orientation. I wrote script checks the size of an image, and converts "portrait" to "landscape" by making a new landscape image made up of a black rectangle and pasting the portrait image in the center. If you want examples of the scripts I can email some to you later.
Developing stuff like this in Python is quite easy, and dare I say, fun... especially because once you can do bread and butter image operations, you may realize that you can also write scripts to do glitchy and generative operations on your images.
~David
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
I am using python, but I am not an expert. I think GEM is faster for image operations, since it is hardwarebased or at least c code. and also I don't want to change my images at all, just display them correctly. the pix_info works great at the moment. I still will have a look at the possibilities with PIL. marius.
I think (please step in Gem developers) that the hardware acceleration only applies to 3d and not pix operations, but maybe I'm wrong. Anyway I don't have hardware acceleration so I don't really know what kind of difference this would make. As I mentioned, I was doing PIL to assist in a Flash site and only afterwards realized it would also help with certain GEM tasks I might need to do.
[pix_info] is probably better suited for your task at the moment, but if you ever need to actually convert / re-render stuff, PIL is great. For instance, I think some [pix] objects require that images be the same size and color space, and it would be trivial to check and convert an entire directory of jpg images. Python might not be as fast to run as C, but for me that's made up for by how quick it is to develop in Python--many simple PIL tasks can be coded under a minute once you get the hang of it.
~David
David Powers wrote:
On 3/21/07, marius schebella marius.schebella@gmail.com wrote:
I am using python, but I am not an expert. I think GEM is faster for image operations, since it is hardwarebased or at least c code. and also I don't want to change my images at all, just display them correctly. the pix_info works great at the moment. I still will have a look at the possibilities with PIL. marius.
I think (please step in Gem developers) that the hardware acceleration only applies to 3d and not pix operations, but maybe I'm wrong. Anyway
true, but [pix_texture] is a "3d" (that is: openGL) operation and therefore hardware acceleration applies.
[pix_draw] is usually NOT done in hardware (at least on non SGI machines ;-)), that is why [pix_texture]+[rectangle] is recommended.
mfg.asdr IOhannes