zoukankan      html  css  js  c++  java
  • 用pb打开i图片

    用pb的setPicture居然报

    JPEG Processing Error
    ---------------------------
    Image too wide for this implementation

    的错误,于是想是否有其他的办法,百度了一下有如下两种容易的方法

    (1)用Windows 图片和传真查看器打开图片
    run("rundll32.exe shimgvw.dll,ImageView_Fullscreen " + "c:a.jpg")

    (2)用默认图片查看程序打开图片

      C/C++ code

      //声明API Function Long ShellExecute(Long hwindow, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd) Library 'shell32.dll' Alias for 'ShellExecuteA' //调用 ShellExecute(handle(this), '', "c:a.jpg", '','', 1) 

      C/C++ code

      string ls_path, ls_file int li_rc ls_path = '\192.168.1.200项目图片' li_rc = GetFileSaveName ( "Select File", & ls_path, ls_file, "jpg", & "All Files (*.*),*.*" , "", & 32770) IF li_rc = 1 Then ls_path //返回的文件完整路径名(含文件名) ls_file //返回的文件名(不含路径) End If

    /*PB中的声明与调用*/
    Function long ShellExecuteA (long hwnd, string lpOperation ,String lpFile, String lpParameters, String lpDirectory, Long nShowCmd)  Library "shell32.dll"
    
    /*也可以*/
    FUNCTION Long ShellExecute ( Long hwnd, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd ) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"
    
    /*调用*/
    
    shellexecutea(handle(this), "open", ls_picture_path, "","", 1)
  • 相关阅读:
    在你设计中可能用到的20个杂志 PSD 原型
    Gradify
    CamanJS – 提供各种图片处理的 JavaScript 库
    免费素材:包含 250+ 组件的 DO UI Kit
    24个很赞的 Node.js 免费教程和在线指南
    Dynamics.js
    Page Scroll Effects
    Slides
    15款加速 Web 开发的 JavaScript 框架
    Wee – 为现代 Web 开发打造的 CSS 脚手架
  • 原文地址:https://www.cnblogs.com/szxiaofei14/p/5010367.html
Copyright © 2011-2022 走看看