Added: 2 years ago
From: phpacademy
Views: 22,626
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (52)

Sign In or Sign Up now to post a comment!
  • if i open the .php page in my webbrowser, it will download it and i can't see a image. If i make a link to the page it also downloads it. can someone help me?

  • Wonderful Tutorial

  • some errors when try to create unicode text image ! Descript the solution about ! Ths

  • how do i change the size of the image text?

  • that's awesome

  • How would it be useful to generate an image with PHP?

  • @idiotrun1997 How could it not be useful to generate an image with PHP. It means you could generate signatures for your users to use on your website as well as other people's websites (forums), that kind of thing.

  • Just a question for the background, can u use an photoshopped image? as background with text on it?

  • @MrRobinatorzzz You can use any image you want as the background image.

  • @Hug0101 Already found it , but it's diffucult for some exact positions :p

  • @MrRobinatorzzz Could you send me a link via Youtube Messaging? :)

  • i love this tutorials realy i didn't know that you can make pictures with PHP THATS AMAIZING

    *good thing about it is that you can make some text that the user cannot copy (you forse him (or her) to monually type something again ANYWAY GREAT TUTORIALS

  • @phpacademy Can you set the background to an image instead of solid color? Say I wanted to create a default avatar for the users that was personalized with their username but I wanted an image with text on it not just a boring solid color background.

  • I got a question. Why is the background black instead of white, since you apply the same method in background and foreground variable, and the foreground comes last. Why foreground didn't overlay background ?

  • @paulver00 Because you wrote the value of the function to one variable and then a different variable. The first variable is not overwritten.

  • that's pretty awesome :D

  • i love you alex - Acceptable67

  • can we save this image directly and access that using<img src=''????? please reply...

  • really good tutorial.. but i have got one problem.. after doing this if i write anything in my html file's body nothing appears on the screen accept for the image i created.

  • @linuguddu : nothing appears in my php file body.

  • Ok. This…

    Looks EPIC!

    I'm on my iPod, but next time I get on the computer, I'm totally testing this! Adding to my website and changing my profile puc!

    Thanks man!

  • Cool Video Thanks! :D

  • hey alex , i'm new to php so forgive me if my question stupid or anything.....

    i ran that code in opera 10.53 ,instead getting image at upper left corner i am getting the image at the center...why?

    by the way,great tuts:)

  • please tell how you used 9.3 ?

  • @plutonimvamsi there where around 32 0r 33 characters to be displayed,and we show it fit perfectly in 300 width.....so 300/32=9.3.so that 9.3 is approx. width of each character...well that's my opinion it could be wrong:)

  • I don't understand how the background color is set. I see how $background is declared, but it's not being used anywhere like $foreground is. Thx!

  • Thanks a Lot Alex, That Was One Wicked Tutorial... Keep Up The Great Work... and if you could please provide a bit more example on the GD Library.

  • Nice video... But when I write this code and try to start it it I see this :

    Fatal error: Call to undefined function: imagecreate() in c:\apache\htdocs\generator.php on line 20

    Do you know what to do plls?

  • Hey Alex, is there a way to set a chroma key, as I need to remove rgb(255,125,25) from my image

  • Try OB_START();

  • I made a program specifically for RGB, Hex, and binary translating. It also comes with a calculator incase you need to do any calculations. PM me if you're interested in it. The RGB part converts a color into hex and in our number system too. You basically get a color panel and you can choose a color. Then my program does the rest of the work. This comment was made when I hit 2:43 of the vid by the way, when you started mentioning RGB.

  • move the session_start(); to the top of the script

  • cool it works, but how do you add other text to the page?

  • You have to make a form and to use the viariable get to add some text or directly to the script

  • Really good tutorial, got the point across (even though I knew how to do this already myself).

    One small problem however is that you can make this more accurate by using a function which comes with the GD library called imagefontwidth(font) which takes a font as a parameter (for example: 5) and returns the width of a single character in that font.

    So the $length variable can be set like so:

    $font_size = 5;

    $length = strlen($message) * imagefontwidth($font_size);

    Good video.

  • how can i make make a character maker?

  • can you change the font?

  • I´m not allowed to edit header info if I call this php code from inside another html document. Due to an output is allready sent. What can I do to solve this?

  • Result is: The image is not showed. The code is ok here if I just run this php alone.

  • Thank Alex. I have to rate this video 5/5. First I thought yet another long tutorial but well it was so interesting all the way and to the point and very brief.

    I have one question. Looking at this video, I realized how they make those images on the fly to avoid spam. Do they make it this way. I just wanted to hear from you about this. They probably distort the image after they create it to make it hard to read. A reply would be appreciated :)

    Again thanks for the wonderful tutorial.

  • to put a custom background (not solid one), what do I have to do ?

    Thanks,

    Shay

    By the way awesome tut!

  • Comment removed

  • Hi Alex...

    Thanks for this wonderful tutorial!

    Can I just ask to show me how exactly you arrived at 9.3, please?

    Kindly walk me through the math there!

  • It's purely experimental :)

  • meaning what though? sorry Alex- but I am still confused?

  • I just changed the figure until it looked right

  • Aha...I see!Thanks for your quick reply!

  • @omanoman98 9.3 is the width of each character, e.g "a" "b" "c" etc... and basically the strlen function counts how many characters there are in the message variable, and then the length variable multiplies the amount of characters by the width of the charaters, and gives you a dynamic width the picture should be :)

    Hope this helps.

  • very crisp & clear explanation!

  • Very very very good tutorial and understoodable,

    keep posting new tutorials =]

  • Thanks, i'm always recording so there will definatly be more to come!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more