Re: [PHP] image generation issues
Thanx for all the help.I discovered the STUPID little problem.my ftp software was set so it uploded .ttf in ascii instead of binary.all works now. thanks again - Original Message - From: "Tom Rogers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 3:38 AM Subject: Re: [PHP] image generation issues > Hi > Some of MS fonts wont work, try downloading some freeware fonts. > Tom > > > At 01:24 PM 2/12/02, Adrian Murphy wrote: > >tried everything suggested and still get 'could not read font' oh well > >thanx. > > > >- Original Message - > >From: "hugh danaher" <[EMAIL PROTECTED]> > >To: "php" <[EMAIL PROTECTED]> > >Sent: Tuesday, February 12, 2002 3:00 AM > >Subject: Re: [PHP] image generation issues > > > > > > > Adrian, > > > If you're using the code displayed, you need to use $im before you destroy > > > it. > > > If you want to deal with it as a .png then use: > > > ImagePNG($im,"some_name.png",100); > > > and then pick up the file anytime using > > > > > > You can later remove it from the server using: > > > unlink("some_name.png"); > > > hope this helps. > > > Hugh > > > > > > - Original Message - > > > From: "Martin Towell" <[EMAIL PROTECTED]> > > > To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; > > > <[EMAIL PROTECTED]> > > > Sent: Monday, February 11, 2002 6:36 PM > > > Subject: RE: [PHP] image generation issues > > > > > > > > > > when you say it doesn't work, do you mean that you get an error message > >or > > > > it just doesn't write the text to the image? > > > > > > > > -Original Message- > > > > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > > > > Sent: Tuesday, February 12, 2002 1:16 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: [PHP] image generation issues > > > > > > > > > > > > Hi, > > > > I'm using the code in the manual to draw text on a png. > > > > but Its not working - ImageString() works but not ImageTTFText() > > > > I uploaded arial.ttf from windows to fonts/ folder > > > > Any Ideas: > > > > as a side note: PNG's - any real disadvantage to using them > > > > instead of gifs - not withstanding the compuserve issue and > > > > old browsers. > > > > > > > > the code > > > > button.php > > > > > > > Header ("Content-type: image/png"); > > > > $im = imagecreate (400, 30); > > > > $black = ImageColorAllocate ($im, 0, 0, 0); > > > > $white = ImageColorAllocate ($im, 255, 255, 255); > > > > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > > > > Omega: Ω"); > > > > ImagePng ($im); > > > > ImageDestroy ($im); > > > > ?> > > > > and i call it with > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image generation issues
Hi Some of MS fonts wont work, try downloading some freeware fonts. Tom At 01:24 PM 2/12/02, Adrian Murphy wrote: >tried everything suggested and still get 'could not read font' oh well >thanx. > >- Original Message - >From: "hugh danaher" <[EMAIL PROTECTED]> >To: "php" <[EMAIL PROTECTED]> >Sent: Tuesday, February 12, 2002 3:00 AM >Subject: Re: [PHP] image generation issues > > > > Adrian, > > If you're using the code displayed, you need to use $im before you destroy > > it. > > If you want to deal with it as a .png then use: > > ImagePNG($im,"some_name.png",100); > > and then pick up the file anytime using > > > > You can later remove it from the server using: > > unlink("some_name.png"); > > hope this helps. > > Hugh > > > > - Original Message - > > From: "Martin Towell" <[EMAIL PROTECTED]> > > To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; > > <[EMAIL PROTECTED]> > > Sent: Monday, February 11, 2002 6:36 PM > > Subject: RE: [PHP] image generation issues > > > > > > > when you say it doesn't work, do you mean that you get an error message >or > > > it just doesn't write the text to the image? > > > > > > -Original Message- > > > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, February 12, 2002 1:16 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] image generation issues > > > > > > > > > Hi, > > > I'm using the code in the manual to draw text on a png. > > > but Its not working - ImageString() works but not ImageTTFText() > > > I uploaded arial.ttf from windows to fonts/ folder > > > Any Ideas: > > > as a side note: PNG's - any real disadvantage to using them > > > instead of gifs - not withstanding the compuserve issue and > > > old browsers. > > > > > > the code > > > button.php > > > > > Header ("Content-type: image/png"); > > > $im = imagecreate (400, 30); > > > $black = ImageColorAllocate ($im, 0, 0, 0); > > > $white = ImageColorAllocate ($im, 255, 255, 255); > > > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > > > Omega: Ω"); > > > ImagePng ($im); > > > ImageDestroy ($im); > > > ?> > > > and i call it with > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image generation issues
tried everything suggested and still get 'could not read font' oh well thanx. - Original Message - From: "hugh danaher" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 3:00 AM Subject: Re: [PHP] image generation issues > Adrian, > If you're using the code displayed, you need to use $im before you destroy > it. > If you want to deal with it as a .png then use: > ImagePNG($im,"some_name.png",100); > and then pick up the file anytime using > > You can later remove it from the server using: > unlink("some_name.png"); > hope this helps. > Hugh > > - Original Message - > From: "Martin Towell" <[EMAIL PROTECTED]> > To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Monday, February 11, 2002 6:36 PM > Subject: RE: [PHP] image generation issues > > > > when you say it doesn't work, do you mean that you get an error message or > > it just doesn't write the text to the image? > > > > -Original Message- > > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, February 12, 2002 1:16 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] image generation issues > > > > > > Hi, > > I'm using the code in the manual to draw text on a png. > > but Its not working - ImageString() works but not ImageTTFText() > > I uploaded arial.ttf from windows to fonts/ folder > > Any Ideas: > > as a side note: PNG's - any real disadvantage to using them > > instead of gifs - not withstanding the compuserve issue and > > old browsers. > > > > the code > > button.php > > > Header ("Content-type: image/png"); > > $im = imagecreate (400, 30); > > $black = ImageColorAllocate ($im, 0, 0, 0); > > $white = ImageColorAllocate ($im, 255, 255, 255); > > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > > Omega: Ω"); > > ImagePng ($im); > > ImageDestroy ($im); > > ?> > > and i call it with > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] image generation issues
unfortunately, the unix php version I've got access to doesn't have support for TTFs :( but the Windows box does - I have to specify the full path to the font - try that and see if that helps. -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 2:04 PM To: Martin Towell; [EMAIL PROTECTED] Subject: Re: [PHP] image generation issues i get 'Could not read font in..' i set permissions to 777 on both file and folder - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 2:36 AM Subject: RE: [PHP] image generation issues > when you say it doesn't work, do you mean that you get an error message or > it just doesn't write the text to the image? > > -Original Message- > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 12, 2002 1:16 PM > To: [EMAIL PROTECTED] > Subject: [PHP] image generation issues > > > Hi, > I'm using the code in the manual to draw text on a png. > but Its not working - ImageString() works but not ImageTTFText() > I uploaded arial.ttf from windows to fonts/ folder > Any Ideas: > as a side note: PNG's - any real disadvantage to using them > instead of gifs - not withstanding the compuserve issue and > old browsers. > > the code > button.php > Header ("Content-type: image/png"); > $im = imagecreate (400, 30); > $black = ImageColorAllocate ($im, 0, 0, 0); > $white = ImageColorAllocate ($im, 255, 255, 255); > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > Omega: Ω"); > ImagePng ($im); > ImageDestroy ($im); > ?> > and i call it with > >
Re: [PHP] image generation issues
i get 'Could not read font in..' i set permissions to 777 on both file and folder - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 2:36 AM Subject: RE: [PHP] image generation issues > when you say it doesn't work, do you mean that you get an error message or > it just doesn't write the text to the image? > > -Original Message- > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 12, 2002 1:16 PM > To: [EMAIL PROTECTED] > Subject: [PHP] image generation issues > > > Hi, > I'm using the code in the manual to draw text on a png. > but Its not working - ImageString() works but not ImageTTFText() > I uploaded arial.ttf from windows to fonts/ folder > Any Ideas: > as a side note: PNG's - any real disadvantage to using them > instead of gifs - not withstanding the compuserve issue and > old browsers. > > the code > button.php > Header ("Content-type: image/png"); > $im = imagecreate (400, 30); > $black = ImageColorAllocate ($im, 0, 0, 0); > $white = ImageColorAllocate ($im, 255, 255, 255); > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > Omega: Ω"); > ImagePng ($im); > ImageDestroy ($im); > ?> > and i call it with > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image generation issues
Adrian, If you're using the code displayed, you need to use $im before you destroy it. If you want to deal with it as a .png then use: ImagePNG($im,"some_name.png",100); and then pick up the file anytime using You can later remove it from the server using: unlink("some_name.png"); hope this helps. Hugh - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Adrian Murphy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 11, 2002 6:36 PM Subject: RE: [PHP] image generation issues > when you say it doesn't work, do you mean that you get an error message or > it just doesn't write the text to the image? > > -Original Message- > From: Adrian Murphy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 12, 2002 1:16 PM > To: [EMAIL PROTECTED] > Subject: [PHP] image generation issues > > > Hi, > I'm using the code in the manual to draw text on a png. > but Its not working - ImageString() works but not ImageTTFText() > I uploaded arial.ttf from windows to fonts/ folder > Any Ideas: > as a side note: PNG's - any real disadvantage to using them > instead of gifs - not withstanding the compuserve issue and > old browsers. > > the code > button.php > Header ("Content-type: image/png"); > $im = imagecreate (400, 30); > $black = ImageColorAllocate ($im, 0, 0, 0); > $white = ImageColorAllocate ($im, 255, 255, 255); > ImageTTFText ($im, 20, 0, 10, 20, $white, "fonts/arial.ttf","Testing... > Omega: Ω"); > ImagePng ($im); > ImageDestroy ($im); > ?> > and i call it with > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] image generation issues
when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php and i call it with
[PHP] image generation issues
Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php and i call it with