Re: MIME file and gd
- From: amit <amit.kohan@xxxxxxxxx>
- Date: Fri, 28 Mar 2008 18:08:31 -0700 (PDT)
On Mar 28, 5:58 pm, amit <amit.ko...@xxxxxxxxx> wrote:
Hello group,
I'm uploading some image files such as jpeg, png and gif. However, I
must convert time to jpeg type. I have few questions:
1) Can I convert time in using gd library?
2) Currently, I check the MIME file to see what is holding (thanks to
Michael ) like image/jpg or image/gif or image/png. But what should be
the criteria? I'm checking:
if ($img_array_info[mime] == "image/jpg" {
...
}
However, there are some files that rather image/jpg they have image/
jpeg as mime in their headers. Should I compare it agaisnt these two
criteria or there are other things I have to consider too?
Thanks,
Amit
Currently I'm doing this:
if ( (strcasecmp($array_img_information[mime], "image/jpg") == 0 ) ||
(strcasecmp($array_img_information[mime], "image/jpeg") == 0 ) )
{
echo "<br>OK, jpeg file<br>";
}
else
{
echo "<br>$array_img_information[mime]<br>";
echo "<br>Not a jpeg file must conver it!<br>";
}
Is this a proper way or ....?
Thanks again.
.
- Follow-Ups:
- Re: MIME file and gd
- From: petersprc
- Re: MIME file and gd
- References:
- MIME file and gd
- From: amit
- MIME file and gd
- Prev by Date: MIME file and gd
- Next by Date: Naked Comment does not trigger Error Message
- Previous by thread: MIME file and gd
- Next by thread: Re: MIME file and gd
- Index(es):
Relevant Pages
|