User Profile

Collapse

Profile Sidebar

Collapse
kip1790
kip1790
Last Activity: Feb 10 '10, 06:35 PM
Joined: Jun 1 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Can you imagecreatefrompng() & imagecopymerge() in one go?

    Is it possible to write text to an image using imagecreatefrom png() like here and merge the image produced with icon.png for example, in one go?

    The output of this PHP produced the image in the link above, I'm looking to merge this output with $icon below:
    Code:
    <?php
    $bg = $_REQUEST['bg'] ;
    $my_img = imagecreatefromjpeg( $bg);
    $text_colour = imagecolorallocate( $my_img, 255, 255, 255 );
    $input_text
    ...
    See more | Go to post

  • kip1790
    replied to Imagettftext () function not working
    in PHP
    I appreciate you testing this on your end. I've spoken to and sent along a simple script that works for me locally, just not on their servers, and they'll test it on their back end to resolve the problem. So hopefully I should be good to go soon enough. Cheers!
    See more | Go to post

    Leave a comment:


  • kip1790
    replied to Imagettftext () function not working
    in PHP
    Hi Markus, I get no errors it just doesn't write text to the image. I tried your function_exists () and I received a 'yes'.

    Even going back to basics and running this code gives me a white image with no text and should return 'Testing...'
    Code:
    <?php
    // Set the content-type
    header('Content-type: image/png');
    
    // Create the image
    $im = imagecreatetruecolor(400, 30);
    
    // Create some colors
    ...
    See more | Go to post

    Leave a comment:


  • kip1790
    started a topic Imagettftext () function not working
    in PHP

    Imagettftext () function not working

    I created an existing sample that writes input text to a background image no problem. See here.

    I attempted to use a font using Imagettftext () following the steps outlined here, however I can't get the function to create the image using the font I specified. This is the code I added to the working page above:
    Code:
    $font = 'arial.ttf';
    imagettftext ($my_img, 10, 15, 30, 40, $txt_colour, $font, $input_text);
    Also tried...
    See more | Go to post

  • I spoke with my web host (1and1) and they assured me that, providing my code was correct and the font was uploaded to the folder my script was running from, it should work. I'm truly stumped on this one...
    See more | Go to post

    Leave a comment:


  • I wasn't sure why I required imagecopymerge when you can write text to a background image using imagecreatefrom jpeg. Anyway I tried again to pass the background value based on dropdown selection and it worked fine. See here. Do you see any problems doing it this way?

    One of the last issues I've faced is using imagettftext to write a particular font to the image, and trust me it's not through lack of effort.

    My host supports...
    See more | Go to post

    Leave a comment:


  • As I understand it you can use an image as background template and just write the text to it to create a new image by replacing imagecreate () with imagecreatefrom jpeg ( "template.j pg"). I did this with my original code here.

    I'm just looking to select one of two backgrounds from a drop down and pass the bg file value to the$background variable in the PHP.

    $input_backgrou nd = $_REQUEST['background'] ;
    $my_img...
    See more | Go to post

    Leave a comment:


  • This is great, thanks. I'm trying to use images as backgrounds instead of RGB colors, I've tried to modify what you've provided but the logic isn't clear to me with the extra code - apologies! - Bg like this for example...

    ...
    See more | Go to post

    Leave a comment:


  • That worked perfectly. There's one more step I'm looking for your help on and hopefully this is a minor change. I've added a drop down with 2 options for a background - Teal/Red - instead of the pre-defined color that was there before. I added a var for this value in the JS and added the drop down to the form. I also added the value that was passed to image.php to be defined as $input_bg as you can see below. So I'm looking for the bg to update with...
    See more | Go to post

    Leave a comment:


  • Thanks for the prompt response. How can I modify the PHP output file to target an iframe?
    See more | Go to post

    Leave a comment:


  • kip1790
    started a topic Need GD Library Imagecreate to display on same page
    in PHP

    Need GD Library Imagecreate to display on same page

    See example here

    Ultimately I want the image created to display next to the update button in the same browser window instead of loading into a new window. Then every time I input text and click 'update' the image is regenerated. As if you're customizing the image with whatever text the user inputs.

    A similar example I've found online is here.

    I'm simply just posting the text input variable to a PHP file...
    See more | Go to post

  • kip1790
    replied to Cannot post a Drop Down value...
    Below is the ASP I'm using.....appre ciate the prompt response.I need to know how to populate the array with the option selected.....
    <%
    '============== =============== ====
    'All fields are acted as required
    ' except those the NAME of which
    ' is in this string variable:
    '============== =============== ====
    exceptions = Array("address" )

    '============== =============== ====
    ...
    See more | Go to post

    Leave a comment:


  • kip1790
    started a topic Cannot post a Drop Down value...

    Cannot post a Drop Down value...

    Hi, I'm sure there is a simple solution for this but I've been trailing the net for hours trying to find one with no avail. I have an ASP page with a standard html form. On submit the values are loaded into an array and I call an ASP file that emails the values to me. Everything works but it seems to skip the drop down value. Please help....

    Code:
    <form action="deliver.asp" method="post">
    
    <p>First
    ...
    See more | Go to post
    Last edited by Markus; Jun 1 '09, 09:46 AM. Reason: Added [code] tags.
No activity results to display
Show More
Working...