>

Home Design Archives php PHPで画像サムネイルを作成する便利クラス

PHPで画像サムネイルを作成する便利クラス

  • 2007年8月31日
  • コメント(0)
  • トラックバック(0)

PHPで画像サムネイルを作成する便利クラス『PHP Thumbnailer』

オリジナル画像は下のオムライス。サイズは横500×縦375ピクセル。

html内で絶対パスで画像を指定します。縮小された表示ではなくて、ダイレクトにphpがサムネールを作成します。

最近のアップルのデザインに多用されているリフレクション効果も可能です。

createReflection($percent,$reflection,$white,$border,$borderColor)

  • $percent - What percentage of the image to create the reflection from
  • $reflection - What percentage of the image height should the reflection height be
  • $white - How transparent (using white as the background) the reflection should be, as a percent
  • $border - Whether a border should be drawn around the original image (default is true)
  • $borderColor - The hex value of the color you would like your border to be (default is #a4a4a4)

その都度ダイレクトに画像を生成するのでサーバーに負荷がかかります。ECサイトなどの画像を多用するサイト向きではないかもしれません。

カテゴリ

コメントを書く

トラックバック(0)(クリック▼)

トラックバックURL

このブログ記事について

このページは、101が2007年8月31日 12:14に書いたブログ記事です。

次のブログ記事は「.htmlファイルでphpを利用」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

Powered by Movable Type 4.21-ja

ページの先頭に戻る