程序要使用人员头像的功能,还要指定头像不能超过50KB,

为了方便用户自己制作头像,于是研究了一个头像截取的功能。

一.使用pb数据窗口进行移动和调整图像的大小位置,

Moveable = true 这个属性允许鼠标拖动对象的位置

Resizeable = true 这个属性进行大小的绽放

PowerBuilder9.0调用GDI+进行图像截取

二.GDI+对图象的压缩

Bitmap* pImage = new Bitmap(pwsFileName); 

ULONG             quality;
quality = 100;这个值表示jpg压缩时的精度
encoderParameters.Parameter[0].Value = &quality;
status = pImage->Save(pwsToFileName, &jpgClsid, &encoderParameters); 

备注:

gdi+在dll中Bitmap对象要使用new 来分配

PowerBuilder9.0调用GDI+进行图像截取

 

powerbuilder9.0功能强大到无法让人直视。哇。厉害。

VC++要实现控件的任意拖放和位置的排版,实现功能真是要哇血。PB分分钟搞定了。

 

 

 

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2021-12-23
  • 2021-08-01
  • 2021-11-10
  • 2022-12-23
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-11-09
  • 2022-02-25
  • 2021-06-03
相关资源
相似解决方案