Re: [PHP] Really impressive work

2010-05-06 Thread Per Jessen
tedd wrote:

> Now, I realize that this company did not take 15 factorial pictures
> of this single piece of jewelry to present all these different
> combinations but instead placed smaller images of each of the stones
> at specific coordinates on the larger image of the jewelry.
> 
> I imagine that each piece of jewelry must have the coordinates of
> each setting in a database so that they can "on-the-fly" assemble the
> finished product as per user's direction.
> 
> For example, let's take the image of the basket pendant showing three
> stones. Each of the stone locations would have a specific pixel
> placement (i.e., x,y). As such, the database would have a field for
> the image and three location fields for stones 1, 2, and 3.
> 
> Now, we also have smaller images of 12 different stones (in heads)
> that are all the same size. Thus, as the user picks the stones and
> positions they want and the image is assembled "on the fly".
> 
> Is that the way you see this? 

Yes - each picture is basically a base + a number of overlays. Quickly
done with e.g. libgd or some such. 



-- 
Per Jessen, Zürich (8.9°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Really impressive work

2010-05-05 Thread Michiel Sikma
On 6 May 2010 00:04, tedd  wrote:

> Hi gang:
>
> I found something that really impressed me -- please review this:

 -snip-


> Now, we also have smaller images of 12 different stones (in heads) that are
> all the same size. Thus, as the user picks the stones and positions they
> want and the image is assembled "on the fly".
>
> Is that the way you see this? Or is there a better way?
>
> Cheers,
>
> tedd
>
>
Personally, I wouldn't bother building an image generator (which isn't that
difficult to do with GD or Imagick--and I wouldn't go as far as to save the
values in a database). This can easily be done in Javascript.
The only reason to build an image generator is if the images need to be used
in a non-browser environment, e.g. sent to the user in an e-mail or enclosed
in a PDF.

At minimum you need all colorized images of the jewels, but you could even
do with one single image and colorize it using . Too bad that's not
supported in anything other than (iirc) Firefox and the Webkit nightly.

Michiel


[PHP] Really impressive work

2010-05-05 Thread tedd

Hi gang:

I found something that really impressed me -- please review this:

http://palomarjewelry.com/product/id/19/collectionId/1/typeId/3

Try changing the number and type of stones and watch the main image 
change (i.e., the basket).


If one calculates the number of permutations required to show this 
single piece of jewelry with 12 different stone types located in 15 
different stone positions, you will arrive at a very large number. 
The specific math escapes me at the moment but something in the order 
of 15 factorial -- a very large number.


Now, I realize that this company did not take 15 factorial pictures 
of this single piece of jewelry to present all these different 
combinations but instead placed smaller images of each of the stones 
at specific coordinates on the larger image of the jewelry.


I imagine that each piece of jewelry must have the coordinates of 
each setting in a database so that they can "on-the-fly" assemble the 
finished product as per user's direction.


For example, let's take the image of the basket pendant showing three 
stones. Each of the stone locations would have a specific pixel 
placement (i.e., x,y). As such, the database would have a field for 
the image and three location fields for stones 1, 2, and 3.


Now, we also have smaller images of 12 different stones (in heads) 
that are all the same size. Thus, as the user picks the stones and 
positions they want and the image is assembled "on the fly".


Is that the way you see this? Or is there a better way?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php