Posted by: spaceufo on: July 11, 2007
*원본자료 : http://www.mins01.com/20070305/m_board/tech.php?b_…
JavaScript에서 Image의 실제 width와 height 알아내기
<img id=’Img1′ src=’http://www.google.com/intl/en_ALL/images/logo.gif’ width=’100′ onclick=’AlertImgSize(this)’>
function AlertImgSize(ElemId) {
var Size = GetImageSize(Img1);
alert(’Width: ‘ + Size.Width + ‘, Height: ‘ + Size.Height);
}
function GetImageSize(ElemId) {
with(TmpImg = document.body.appendChild(document.createElement(’img’))) {
src = ElemId.src;
[...]
Posted by: spaceufo on: June 14, 2007
to create an image from a BMP file, DHKold(admin@dhkold.com) made this function, that return a resource like the others ImageCreateFrom function:
*from : http://kr2.php.net/manual/kr/function.imagecreate.php#53879