pbimage
1.0.0
图像类型转换,缩放,PowerBuilder中的修改
更多信息:PBNI-RS
cargo build --release
# Copy target i 686 -pc-windows-msvc r elease p bimage . dll file to the pb project directoryBMP,JPEG,GIF,PNG,ICO,TIFF,WebP
nrs_tp_image nimage
nimage = create nrs_tp_image
if nimage.open( "pic.jpg" ) then
//Convert jpg images to png format,save to file ;
nimage.save( "pic.png" )
end if blob bimg
nrs_tp_image nimage
nimage = create nrs_tp_image
if nimage.open( "pic.jpg" ) then
//Convert jpg images to png format,data to blob ;
bimg = nimage.as_bytes( enum .IMAGEFORMAT_PNG))
end if nrs_tp_image nimage
nimage = create nrs_tp_image
if nimage.open( "pic.jpg" ) then
//Generate 200 * 200 thumbnail and convert to png
nimage.thumbnail( 200 , 200 ).save( "pic.png" )
end if nrs_tp_image nimage
nimage = create nrs_tp_image
if nimage.open( "pic.jpg" ) then
//Resize to 200 * 200 with FILTERTYPE_NEAREST and convert to png
nimage.resize( 200 , 200 , enum .FILTERTYPE_NEAREST).save( "pic.png" )
end if| 功能名称 | 描述 |
|---|---|
| 公共功能ULONG高度() | 高度 |
| 公共功能ULONG宽度() | 宽度 |
| 公共功能NRS_TP_IMAGE灰度() | 灰度 |
| public subroutine invert() | 倒置 |
| 公共功能NRS_TP_IMAGE BLUR(READONLY REAL SIGMA) | 模糊 |
| 公共功能nrs_tp_image unsharpen(ReadOnly Real Sigma,ReadOnly Long Threshold) | Unsharpen |
| 公共功能nrs_tp_image adpad_contrast(ReadOnly Real c) | awad_contrast |
| 公共功能nrs_tp_image亮(可读取长v) | 照亮 |
| 公共功能NRS_TP_IMAGE HUEROTATE(READONLY LONG V) | Huerotate |
| 公共功能NRS_TP_IMAGE FLIPV() | flipv |
| 公共功能nrs_tp_image fliph() | Fliph |
| 公共功能nrs_tp_image rotate90() | 旋转90 |
| 公共功能nrs_tp_image rotate180() | 旋转180 |
| 公共功能nrs_tp_image rotate270() | 旋转270 |
nrs_tp_image nimage
nimage = create nrs_tp_image
if nimage.open( "pic.jpg" ) then
//Chaining Style
nimage.thumbnail( 200 , 200 ).grayscale().blur( 2 . 0 ).flipv().save( "pic.png" )
end if public function nrs_tp_image resize( readonly ulong nwidth, readonly ulong nheight, readonly uint filtertype)
public function nrs_tp_image resize_exact( readonly ulong nwidth, readonly ulong nheight, readonly uint filtertype)
public function nrs_tp_image resize_to_fill( readonly ulong nwidth, readonly ulong nheight, readonly uint filtertype)
public function nrs_tp_image thumbnail( readonly ulong nwidth, readonly ulong nheight)
public function nrs_tp_image thumbnail_exact( readonly ulong nwidth, readonly ulong nheight)
public function uint color()