[ sojic @ 03.02.2003. 17:57 ] @
Radim Dnevnik skole (ucenici, ocene, izostanci). Svaki ucenik ima photo. Dali je pametnije da taj photo stavim u blob polju ili u jpg, a u bazi da pamtim samo ime fajla.

Ja mislim da mi je bolje da pamtim u .jpg a ime .jpg fajla da bude u stvari ID ucenika na primer:
Id: 001
Ime: Milutko
Prezime: Elektricar
Itd.....

a u direktoriumu ./images/001.jpg je njegova slika, tako da bide jednostavnije odrzavanje t.e. update slike, samo smenis fajl, ne opteretujes mysql server.
[ CONFIQ @ 03.02.2003. 18:02 ] @
Moj savet:
Koristi fajlove umesto BLOP-a i koristi image*(); funkcije da manipulišeš slikama...
[ -zombie- @ 03.02.2003. 19:30 ] @
blob je sporije resenje (vise opterecuje mysql) ali ako pravish nesto nece da ima 10000 pageview-a dnevno, nije bitno...

u principu, svodi se na to, kako ti je lakse...
[ bluesman @ 04.02.2003. 01:13 ] @
Citat:
CONFIQ:
Moj savet:
Koristi fajlove umesto BLOP-a i koristi image*(); funkcije da manipulišeš slikama...

Slazem se sa prvim, ali za manipulaciju slika (resize i jos mnostvo drugih finkcija) preporucujem da se koristi imageMagick, besplatan je, postoji za *nix i win, a kvalitet slika je besprekoran. Sintaksa je jednostavna, gde ces vise?

Za primer, evo opcija za mogrify (samo da vidis sta se moze):
Code:

Version: ImageMagick 5.5.1 10/20/02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 2002 ImageMagick Studio LLC

Usage: mogrify [options ...] file [ [options ...] file ...]

Where options include:
  -affine matrix       affine transform matrix
  -antialias           remove pixel-aliasing
  -authenticate value  decrypt image with this password
  -background color    background color
  -blue-primary point  chomaticity blue primary point
  -blur radius         blur the image
  -border geometry     surround image with a border of color
  -bordercolor color   border color
  -channel type        extract a particular color channel from image
  -charcoal radius     simulate a charcoal drawing
  -chop geometry       remove pixels from the image interior
  -colorize value      colorize the image with the fill color
  -colors value        preferred number of colors in the image
  -colorspace type     alternate image colorspace
  -comment string      annotate image with comment
  -compress type       image compression tyhpe
  -contrast            enhance or reduce the image contrast
  -crop geometry       preferred size and location of the cropped imag
  -cycle amount        cycle the image colormap
  -debug events        display copious debugging information
  -delay value         display the next image after pausing
  -density geometry    horizontal and vertical density of the image
  -depth value         image depth
  -despeckle           reduce the speckles within an image
  -display server      get image or font from this X server
  -dispose method      Undefined, None, Background, Previous
  -dither              apply Floyd/Steinberg error diffusion to image
  -draw string         annotate the image with a graphic primitive
  -edge radius         apply a filter to detect edges in the image
  -emboss radius       emboss an image
  -encoding type       text encoding type
  -endian type         LSB or MSB
  -enhance             apply a digital filter to enhance a noisy image
  -equalize            perform histogram equalization to an image
  -fill color          color to use when filling a graphic primitive
  -filter type         use this filter when resizing an image
  -flip                flip image in the vertical direction
  -flop                flop image in the horizontal direction
  -font name           render text with this font
  -format type         image format type
  -frame geometry      surround image with an ornamental border
  -fuzz distance       colors within this distance are considered equa
  -gamma value         level of gamma correction
  -gaussian geometry   gaussian blur an image
  -geometry geometry   perferred size or location of the image
  -green-primary point chomaticity green primary point
  -implode amount      implode image pixels about the center
  -interlace type      None, Line, Plane, or Partition
  -help                print program options
  -label name          assign a label to an image
  -level value         adjust the level of image contrast
  -limit type value    Disk, Map, or Memory resource limit
  -list type           Color, Delegate, Format, Magic, Module, or Type
  -loop iterations     add Netscape loop extension to your GIF animati
  -map filename        transform image colors to match this set of col
  -mask filename       set the image clip mask
  -matte               store matte channel if the image has one
  -median radius       apply a median filter to the image
  -modulate value      vary the brightness, saturation, and hue
  -monochrome          transform image to black and white
  -negate              replace every pixel with its complementary colo
  -noop                do not apply options to image-noise radius
reduce noise in an image.
  -normalize           transform image to span the full range of color
  -opaque color        change this color to the fill color
  -page geometry       size and location of an image canvas
  -paint radius        simulate an oil painting
  -fill color           color for annotating or changing opaque color
  -pointsize value     font point size
  -profile filename    add ICM or IPTC information profile to image
  -quality value       JPEG/MIFF/PNG compression level
  -raise value         lighten/darken image edges to create a 3-D effe
  -red-primary point  chomaticity red primary point
  -region geometry     apply options to a portion of the image
  -resize geometry     perferred size or location of the image
  -roll geometry       roll an image vertically or horizontally
  -rotate degrees      apply Paeth rotation to the image
  -sample geometry     scale image with pixel sampling
  -sampling-factor geometry
                       horizontal and vertical sampling factor
  -scale geometry      scale the image
  -scene number        image scene number
  -seed value          pseudo-random number generator seed value
  -segment values      segment an image
  -shade degrees       shade the image using a distant light source
  -sharpen radius      sharpen the image
  -shear geometry      slide one edge of the image along the X or Y ax
  -size geometry       width and height of image
  -solarize threshold  negate all pixels above the threshold level
  -spread amount       displace image pixels by a random amount
  -stroke color        graphic primitive stroke color
  -strokewidth value   graphic primitive stroke width
  -swirl degrees       swirl image pixels about the center
  -texture filename    name of texture to tile onto the image backgrou
  -threshold value     threshold the image
  -tile filename       tile image when filling a graphic primitive
  -transform           affine transform image
  -transparent color   make this color transparent within the image
  -treedepth value     color tree depth
  -trim                trim image edges
  -type type           image type
  -undercolor color    annotation bounding box color
  -units type          PixelsPerInch, PixelsPerCentimeter, or Undefine
  -unsharp geometry    sharpen the image
  -verbose             print detailed information about the image
  -version             print version information
  -view                FlashPix viewing transforms
  -virtual-pixel method
                       Constant, Edge, Mirror, or Tile
  -wave geometry       alter an image along a sine wave
  -white-point point   chomaticity white point

By default, the image format of `file' is determined by its magic
number.  To specify a particular image format, precede the filename
with an image format name and a colon (i.e. ps:image) or specify the
image type as the filename suffix (i.e. image.ps).  Specify 'file' as
'-' for standard input or output.
[ bluesman @ 04.02.2003. 01:14 ] @
i jos nesto, vazno: naravno, radi sam sa fajlovim na disku, ne i sa blob field-ovima :-)
[ CONFIQ @ 04.02.2003. 13:06 ] @
Hmmm ne radi sajt...
Sa image*(); možeš da radiš i sa BLOP-ovima a GP library je uvek bila besplatna i postojala za WIN a instalirano je po default-u PHP-a tako da ne mora da se čovek muči da instalira još jedan program....