I'm working on a site that sells images of paintings. The client has images of frames he would like to place around those images. The problem is that the images of the paintings are in a large number of different sizes so I needed to slice the frame images and place them around the paintings using code so that they appear as one image. This works but the problem is that the frame images have shading that makes slicing them difficult. Once the image is put back together, the shading is off since I am building it from the slices. So I am looking for an alternative way of doing this. I saw mention on the web that this can be done with css and/or flash but I could not find any examples of it. Can anyone please explain how another method would work or even make suggestions for getting better results using image slicing?
If the pictures are the same size every time, or one of a number of pre-set sizes, you can create the frame image with the correct inner size for the pictures you are using. The you just need to layer the image on top of an element with the frame as the background. As long as you have the correct size background frame for the image, it should always mach up. There may be ways to dynamically resize the frame image, but this could get really complicated to do on the fly. You could look into imagemagick or use gd libraries to resize on the fly. Other than these, I don't think there is a way other than slicing each frame into 8 pieces. 1 for each side, and 1 for each corner.
Hi, Consider using phpthumb for your use. It is super sexy, and will adjust the image size to match the frames and stuff. You can read the documentation to know more!! It is really a great script for you to work with. All the best! imphp
Thanks for the suggestions. I did try phpthumb and it works great. The $500 fee for such a script is quite high for this type of script but if my client wants it bad enough, he will pay it. It does solve the problem and that is what I needed, so thanks for mentioning it.