Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Ricardo Lopes
I havent used GD but i know it can make that, try:
- the other mailing list you will get help.
- read the docs (phpmanual)

- you could use the pear package ImageTransform it looks like what you want
:) http://www.pear.php.net/package/Image_Transform

Here is the description of the package:

---
This package was written to provide a simpler and cross-library interface to
doing image transformations and manipulations.
It provides :

* support for GD, ImageMagick, Imagick and NetPBM
* files related functions
* addText
* Scale (by length, percentage, maximum X/Y)
* Resize
* Rotate (custom angle)
* Add border (soon)
* Add shadow (soon)

- Original Message -
From: "Nikos Gatsis" <[EMAIL PROTECTED]>
To: "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 3:36 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> Thank you Recardo
> Is possible to know the dimensions (x, y) of the stored image?
>
> I try ImageCreateFromJPEG($mystoredpict) and ImagesX($mystoredpict) but
> dosen't work
>
> - Original Message -
> From: "Ricardo Lopes" <[EMAIL PROTECTED]>
> To: "Nikos Gatsis" <[EMAIL PROTECTED]>
> Cc: "PHP DB" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 4:41 PM
> Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > To know the size of the images you could use a library like GD or
> something
> > like that.
> >
> > You can also store one big image in your database and use the graphics
> > library to create a temporary image that will be send to the client with
> the
> > size / scale you want to send to the client. This way your 50k or 5000k
> > image will be used to create a small image ~5k that will be send to the
> > client.
> >
> > Hope this helps
> >
> > - Original Message -
> > From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > To: "PHP-mailist" <[EMAIL PROTECTED]>
> > Sent: Monday, February 16, 2004 2:23 PM
> > Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
> >
> >
> > > Thanx
> > > but, first I dont know the real size of the stored pictures and second
I
> > > dont think that is a good idea to shrink a 50k photo.
> > >
> > > - Original Message -
> > > From: "Frisley Velasquez" <[EMAIL PROTECTED]>
> > > To: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > > Sent: Monday, February 16, 2004 4:16 PM
> > > Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
> > >
> > >
> > > > Hi, the only thing you need to do, is to add a varible where you
> specify
> > > the
> > > > width and the height of the pics. then add the var in the query.
This
> to
> > > be
> > > > parsed not just as a  but as  > > > height="...">, so your images will be the width and height you want.
> > > >
> > > > Or if you would like dif. sizes, add a column in the table so you
can
> > > enter
> > > > the width and height of each one, so you can call this ones(width
and
> > > > height) in each case.
> > > >
> > > > - Original Message -
> > > > From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > > > To: "PHP-mailist" <[EMAIL PROTECTED]>
> > > > Sent: Monday, February 16, 2004 6:56 AM
> > > > Subject: [PHP-DB] - Resizeing Images stored in mysql db
> > > >
> > > >
> > > > > Hello list
> > > > >
> > > > > I store images in a mysql table and use then in a web site.
> > > > >
> > > > > Is possible to change the size of these images;
> > > > >
> > > > >
> > > > > Following the code I'm allredy use.
> > > > >
> > > > >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> > > > >  $result=mysql_db_query($database, $query, $conn) or Die
> > > > > ("...".mysql_error());
> > > > >  list($photoxl)=mysql_fetch_row($result);
> > > > >  $type = $photoxl_type;
> > > > >  if (!empty($photoxl)) {
> > > > >   header("Content-Type: {$type}");
> > > > >   echo $photoxl;
> > > > >  }
> > > > >
> > > > > Thank you  in advance
> > > > >
> > > > > --
> > > > > PHP Database Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Thank you Recardo
Is possible to know the dimensions (x, y) of the stored image?

I try ImageCreateFromJPEG($mystoredpict) and ImagesX($mystoredpict) but
dosen't work

- Original Message - 
From: "Ricardo Lopes" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>
Cc: "PHP DB" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 4:41 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> To know the size of the images you could use a library like GD or
something
> like that.
>
> You can also store one big image in your database and use the graphics
> library to create a temporary image that will be send to the client with
the
> size / scale you want to send to the client. This way your 50k or 5000k
> image will be used to create a small image ~5k that will be send to the
> client.
>
> Hope this helps
>
> - Original Message -
> From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> To: "PHP-mailist" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 2:23 PM
> Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > Thanx
> > but, first I dont know the real size of the stored pictures and second I
> > dont think that is a good idea to shrink a 50k photo.
> >
> > - Original Message -----
> > From: "Frisley Velasquez" <[EMAIL PROTECTED]>
> > To: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > Sent: Monday, February 16, 2004 4:16 PM
> > Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
> >
> >
> > > Hi, the only thing you need to do, is to add a varible where you
specify
> > the
> > > width and the height of the pics. then add the var in the query. This
to
> > be
> > > parsed not just as a  but as  > > height="...">, so your images will be the width and height you want.
> > >
> > > Or if you would like dif. sizes, add a column in the table so you can
> > enter
> > > the width and height of each one, so you can call this ones(width and
> > > height) in each case.
> > >
> > > - Original Message -
> > > From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > > To: "PHP-mailist" <[EMAIL PROTECTED]>
> > > Sent: Monday, February 16, 2004 6:56 AM
> > > Subject: [PHP-DB] - Resizeing Images stored in mysql db
> > >
> > >
> > > > Hello list
> > > >
> > > > I store images in a mysql table and use then in a web site.
> > > >
> > > > Is possible to change the size of these images;
> > > >
> > > >
> > > > Following the code I'm allredy use.
> > > >
> > > >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> > > >  $result=mysql_db_query($database, $query, $conn) or Die
> > > > ("...".mysql_error());
> > > >  list($photoxl)=mysql_fetch_row($result);
> > > >  $type = $photoxl_type;
> > > >  if (!empty($photoxl)) {
> > > >   header("Content-Type: {$type}");
> > > >   echo $photoxl;
> > > >  }
> > > >
> > > > Thank you  in advance
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Ricardo Lopes
To know the size of the images you could use a library like GD or something
like that.

You can also store one big image in your database and use the graphics
library to create a temporary image that will be send to the client with the
size / scale you want to send to the client. This way your 50k or 5000k
image will be used to create a small image ~5k that will be send to the
client.

Hope this helps

- Original Message -
From: "Nikos Gatsis" <[EMAIL PROTECTED]>
To: "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 2:23 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> Thanx
> but, first I dont know the real size of the stored pictures and second I
> dont think that is a good idea to shrink a 50k photo.
>
> - Original Message -
> From: "Frisley Velasquez" <[EMAIL PROTECTED]>
> To: "Nikos Gatsis" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 4:16 PM
> Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > Hi, the only thing you need to do, is to add a varible where you specify
> the
> > width and the height of the pics. then add the var in the query. This to
> be
> > parsed not just as a  but as  > height="...">, so your images will be the width and height you want.
> >
> > Or if you would like dif. sizes, add a column in the table so you can
> enter
> > the width and height of each one, so you can call this ones(width and
> > height) in each case.
> >
> > ----- Original Message -----
> > From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > To: "PHP-mailist" <[EMAIL PROTECTED]>
> > Sent: Monday, February 16, 2004 6:56 AM
> > Subject: [PHP-DB] - Resizeing Images stored in mysql db
> >
> >
> > > Hello list
> > >
> > > I store images in a mysql table and use then in a web site.
> > >
> > > Is possible to change the size of these images;
> > >
> > >
> > > Following the code I'm allredy use.
> > >
> > >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> > >  $result=mysql_db_query($database, $query, $conn) or Die
> > > ("...".mysql_error());
> > >  list($photoxl)=mysql_fetch_row($result);
> > >  $type = $photoxl_type;
> > >  if (!empty($photoxl)) {
> > >   header("Content-Type: {$type}");
> > >   echo $photoxl;
> > >  }
> > >
> > > Thank you  in advance
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Thanx
but, first I dont know the real size of the stored pictures and second I
dont think that is a good idea to shrink a 50k photo.

- Original Message - 
From: "Frisley Velasquez" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 4:16 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> Hi, the only thing you need to do, is to add a varible where you specify
the
> width and the height of the pics. then add the var in the query. This to
be
> parsed not just as a  but as  height="...">, so your images will be the width and height you want.
>
> Or if you would like dif. sizes, add a column in the table so you can
enter
> the width and height of each one, so you can call this ones(width and
> height) in each case.
>
> - Original Message -
> From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> To: "PHP-mailist" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 6:56 AM
> Subject: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > Hello list
> >
> > I store images in a mysql table and use then in a web site.
> >
> > Is possible to change the size of these images;
> >
> >
> > Following the code I'm allredy use.
> >
> >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> >  $result=mysql_db_query($database, $query, $conn) or Die
> > ("...".mysql_error());
> >  list($photoxl)=mysql_fetch_row($result);
> >  $type = $photoxl_type;
> >  if (!empty($photoxl)) {
> >   header("Content-Type: {$type}");
> >   echo $photoxl;
> >  }
> >
> > Thank you  in advance
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Hello list

I store images in a mysql table and use then in a web site.

Is possible to change the size of these images;


Following the code I'm allredy use.

 $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
 $result=mysql_db_query($database, $query, $conn) or Die
("...".mysql_error());
 list($photoxl)=mysql_fetch_row($result);
 $type = $photoxl_type;
 if (!empty($photoxl)) {
  header("Content-Type: {$type}");
  echo $photoxl;
 }

Thank you  in advance

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php