image, color, CGI

Blitz3D Forums/Blitz3D Programming/image, color, CGI

jtassinari(Posted 2010) [#1]
Hi there,

i have a little question. I am working on an application that should create a wide image built with littler one. To make it easey the ending point should look like a x*y (varialbe size) image looking like a chess table.
The problem is that each square of the image sould be loaded as an image (a basic pattern) and should be of a specific color.

it could be like a matrix M0[ [RGB], M1 [R,C] ] for each x,y sub-image i have a different color.

By now i have been able to create the main image detect rows and columns ammount, load and scale the subset of images required, givin the correct x & y,... but can i apply a color to an image???
Does anyone know if i can use a CGI (php scrpt)? any exemple around?

thanks indeed
(please excuse my mad engish :D )

jTassinari


jtassinari(Posted 2010) [#2]
one more question, trying to understand what i should better do...

are LoadImage, CreateImage generating an entity?

how can i handel an image? should i better use a Sprite?

thanks everyone,

cheers,

jT


Warner(Posted 2010) [#3]
I don't think you can filter default 2d images with any of the built-in commands. You can parse the image's pixels, and change them. (readpixel/writepixel)
Alternatively, you can use 3D commands to do this:


Last edited 2010


Yasha(Posted 2010) [#4]
should i better use a Sprite?



Sprites are slow. Better to use a singe-surface solution. Many of these have already been made, e.g.:

http://www.blitzbasic.com/Community/posts.php?topic=92270


jtassinari(Posted 2010) [#5]
Thnaks Warner,

I already use ReadPixel to get 3 arrais of rgb values,
they areread from a wool strem. Then i have some more params to get as wool-knote, knote size(H*W), Knote Consume Len, and Required Pattter to obtain.

Strange but true B3D is proving to be a bettere solution for this stupid industrial beta then MS Studio...

Thanks Yasha, It's ok, sprite are slower, but i'm not going for preformance now, i'm try to get correct computation and to obtain a bpm/pict. Actually i'm using a frame rate of 10 fps, 1 min to load the array color from a sample, and so on.

The pattern i Load is a png/bmp of a wool-knote. at the and i should obtain something like what's here...

[img http://www.absolute-line.net/http://www.absolute-line.net/wp-content/uploads/2010/10/04-Merinos_Nm2500_lowRes-300x155.jpg]

thanks =)
cheers,

JT

Last edited 2010

Last edited 2010

Last edited 2010