Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP Manual > SWFBitmap->__construct - Loads Bitmap object





ลองใช้ค้นหาข้อมูล


   
Bookmark.

SWFBitmap->__construct

(No version information available, might be only in CVS)

SWFBitmap->__constructLoads Bitmap object

Description

SWFBitmap
SWFBitmap __construct ( mixed $file [, mixed $alphafile ] )
Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

Creates the new SWFBitmap object from the given file .

Parameters

For both parameters you can provide a file pointer returned by fopen() or the image data, as a binary string.

file

Note: We can only deal with baseline (frame 0) jpegs, no baseline optimized or progressive scan jpegs!

You can't import png images directly, though- have to use the png2dbl utility to make a dbl ("define bits lossless") file from the png. The reason for this is that I don't want a dependency on the png library in ming- autoconf should solve this, but that's not set up yet.

alphafile

An MSK file to be used as an alpha mask for a JPEG image.

Examples

Example #1 Importing a DBL file

<?php
$s 
= new SWFShape();
$f $s->addFill(new SWFBitmap(file_get_contents("image.dbl")));
$s->setRightFill($f);

$s->drawLine(320);
$s->drawLine(032);
$s->drawLine(-320);
$s->drawLine(0, -32);

$m = new SWFMovie();
$m->setDimension(3232);
$m->add($s);

header('Content-type: application/x-shockwave-flash');
$m->output();
?>

Example #2 Using an alpha mask

<?php

$s 
= new SWFShape();

// .msk file generated with "gif2mask" utility
$f $s->addFill(new SWFBitmap(file_get_contents("alphafill.jpg"), file_get_contents("alphafill.msk")));
$s->setRightFill($f);

$s->drawLine(6400);
$s->drawLine(0480);
$s->drawLine(-6400);
$s->drawLine(0, -480);

$c = new SWFShape();
$c->setRightFill($c->addFill(0x990x990x99));
$c->drawLine(400);
$c->drawLine(040);
$c->drawLine(-400);
$c->drawLine(0, -40);

$m = new SWFMovie();
$m->setDimension(640480);
$m->setBackground(0xcc0xcc0xcc);

// draw checkerboard background
for ($y=0$y<480$y+=40) {
  for (
$x=0$x<640$x+=80) {
    
$i $m->add($c);
    
$i->moveTo($x$y);
  }

  
$y+=40;

  for (
$x=40$x<640$x+=80) {
    
$i $m->add($c);
    
$i->moveTo($x$y);
  }
}

$m->add($s);

header('Content-type: application/x-shockwave-flash');
$m->output();
?>



ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่