Search found 10 matches
- Sun Jun 27, 2010 9:02 am
- Forum: PHP - Code
- Topic: image generation
- Replies: 2
- Views: 75
Re: image generation
Yes, I have a foal coat color calculator that I've set up to generate images of the results using layers (there are oodles of possibilities). I was just wondering if there was a better way to do it. Here's the calculator if anyone wants to take a look. http://www.equine-color.info/calc/colorcalc.php
- Sun Jun 27, 2010 12:49 am
- Forum: PHP - Code
- Topic: image generation
- Replies: 2
- Views: 75
image generation
In what ways is it possible to generate images on a website? I'm wondering about images like on this website http://www.hajinc.com/index.php I'm know they can be done using GD and layers but are there other better ways?
Thanks,
Daylene
Thanks,
Daylene
- Fri Jun 18, 2010 10:26 pm
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
Re: php help needed please using foreach $key as a file name
Well this is a bit embarrassing... This afternoon I restarted my computer. I was still getting wrong results but they weren't the same wrong results (some of the img were actually correct but some where still wrong). Which made me curious so I uploaded the files to host and walla everything works li...
- Fri Jun 18, 2010 5:50 pm
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
Re: php help needed please using foreach $key as a file name
I can't get to the computer the files are on atm but all the keys in the array are unique. I made sure of that for other reasons before any output. Therefore $name should be unique for each iterations as well. I will still try your code though and let you know as soon as my kid finishes his dungon. ...
- Fri Jun 18, 2010 11:05 am
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
Re: php help needed please using foreach $key as a file name
Are you sure you want to see all of it? It's just a bunch of if else statements looking for stuff in $key and pushing the results to a different array. Its probably quite messy compared to what a professional could do. $j=0; echo "<div style=\"margin-left: 15%; margin-right: auto; padding-...
- Thu Jun 17, 2010 6:55 pm
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
Re: php help needed please using foreach $key as a file name
Yes, it does. In fact, I do several operations on the array and everything works perfectly. The output to the browser even reads correctly (correct files names and call). The images just aren't created. I'm not understanding why it works with img$j.png and not $key.png. That is the only difference.
- Thu Jun 17, 2010 4:43 pm
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
Re: php help needed please
No, the second foreach is used to layer images that are stored in an array and is closed before the image is saved or sent to the browser. foreach($stringvar as $key=>$value){ // do some stuff foreach ($colorpic as $img){ // layer the image } //save layered image to file //output saved file to the b...
- Thu Jun 17, 2010 2:05 pm
- Forum: PHP - Code
- Topic: php help needed please using foreach $key as a file name
- Replies: 10
- Views: 501
php help needed please using foreach $key as a file name
I'm writting code to output some images. The code foreach($stringvar as $key=>$value){ echo "<p style=\"font-size:20px;\" onmouseover=\"ShowPart('uniquename$j');\" onmouseout=\"HidePart('uniquename$j');\"; >$key has a $value% Chance of Occuring<br></p>"; do so...
- Fri May 28, 2010 7:43 pm
- Forum: PHP - Code
- Topic: Layering Images with PHP problem
- Replies: 1
- Views: 142
Re: Layering Images with PHP problem
I found the problem! Who knew that google would be the solutions? :lol: luxian.m [at] gmail [dot] com 16-Sep-2008 12:36 Don't forget about imagealphablending() and imagesavealpha() if you're working with [semi]transparent png. <?php $file = 'semitransparent.png'; // path to png image $img = imagecre...
- Fri May 28, 2010 1:01 pm
- Forum: PHP - Code
- Topic: Layering Images with PHP problem
- Replies: 1
- Views: 142
Layering Images with PHP problem
I'm working on some code where I layer images using php. The actual code works fine. The problem I'm having is with the images. I started off with a standard image and erased the background using gimp. I then modified the images for use as layers. No problem right? Everything looks great and I save ...