PhaZZed Posted November 29, 2007 Share Posted November 29, 2007 Greetings all, Yesterday I got some text -> image code working, which basically takes a text value and converts it to an image with a font of choice, the example may be viewed here.. http://www.trafficmagic.co.uk/glitter/glitter.php - now what I would like to do, is fill the black areas (ie. the font) with another image, here's an example: http://www.imod.co.za/glitter.gif.. Any help would be greatly appreciated.. Quote Link to comment Share on other sites More sharing options...
aschk Posted November 29, 2007 Share Posted November 29, 2007 Hmm, thats an interesting one. It would seem to me that the font layer would need to be rasterised, made transparent, masked, then the other image placed underneath it. However, how you achieve this using php/GD2 i don't have the foggiest. Hopefully my comments will spark some research off for yourself. Quote Link to comment Share on other sites More sharing options...
PhaZZed Posted November 29, 2007 Author Share Posted November 29, 2007 Hehe, thanks for replying, ye I'm not actually sure where to go from here unfortunately, I've not played with image manipulation much =\ Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 29, 2007 Share Posted November 29, 2007 would this not be done by javascript or css? Quote Link to comment Share on other sites More sharing options...
helraizer Posted November 29, 2007 Share Posted November 29, 2007 would this not be done by javascript or css? Probably not CSS because that text is not actually text in this case it's a .gif image. ----- PhaZZed: On that glitter text site they always have white stars flying around in them; however if you change the font color to white there are no stars. My guessing is that they have used layers. A layer than constantly has the flying stars in it, and a layer on top hiding it that makes transparent shapes of the letters; thus showing the underneath layer on only the points of the letters... It's the colour of the bottom layer that changes thus does not show up white... That's a theory anyway... as to how do it? I have no idea. I could probably work something out but it'd take a while. Sam Quote Link to comment Share on other sites More sharing options...
koolaid11 Posted November 29, 2007 Share Posted November 29, 2007 you could do an overlay.. like switch the color and just offset it a few pixels to get the shadow... but i am unsure about the sparkles.. Quote Link to comment Share on other sites More sharing options...
PhaZZed Posted November 29, 2007 Author Share Posted November 29, 2007 Hmmm, the stars are not that important really, I would just like to be able to put a pattern inside the font basically, grrrr, struggling on this one Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.