SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: handle bmp files for thumnail
-
May 11, 2007, 05:13 #1
- Join Date
- Aug 2006
- Location
- India
- Posts
- 488
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
handle bmp files for thumnail
Hello,
i was writing a script for thumnail creation and i wonder i don't have imagecreatefrombmp() sort of image which can get me a source filename for further .Can anyone guide me how i can use gd2 to create .bmp thumbnail
Regards,
Priti
-
May 11, 2007, 14:42 #2
- Join Date
- May 2005
- Location
- S.W. France
- Posts
- 2,496
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
GD doesnt handle BMP files by default, I beleive there is a third party function available for doing this but cant remember the link, suggest a google search.
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
-
May 11, 2007, 15:29 #3
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
Why are you trying to use an image file in a format that isn't supported on the web? Images for use on the web need to be GIF, JPG, or PNG format in order for web browsers to be able to display them at all. GD supports all three of those formats.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
May 11, 2007, 22:41 #4
- Join Date
- Aug 2006
- Location
- India
- Posts
- 488
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I strongly go with you felgall but what if client don't understand man .all other three working fine with gd.Tell me one more thing the thumnail created via gd is that a valid image i mean what i did is i create a thumnail in .png format and i used the same image and sended it again for thumnail again it shows me error in image so i am bit surprised that thumnail created are valid or not.
thanks for dropping your advise on my post
regards
-
May 12, 2007, 15:09 #5
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
It doesn't matter what the client wants to use for images - you have to convert them to GIF, JPG, or PNG in order to be able to use them on the web at all. That is a part of the job of converting the client supplied content for web use. If you upload BMPs then you will make the page extremely slow to display and the BMP wont show anyway as modern web browsers will not recognise it as an image.
If your code is creating images that give errors then maybe there is something wrong with the code. Maybe you are not writing all of the things into the image that need to be there for the subsequent processing to work properly.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
Bookmarks