⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jpgapi.htm

📁 JPG Graph API Win 32 JPG API is a 32bit JPEG api dll. You can call it to show a JPG file in your
💻 HTM
字号:
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="Lingsong He">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en]C-NECCK  (Win95; I) [Netscape]">
   <META NAME="Description" CONTENT="Support FoxPro, Vb, Vc and others to show a JPEG file by only a JPG api.">
   <META NAME="KeyWords" CONTENT="foxpro,JPG,JPEG,api,dll">
   <TITLE>Win32 JPG Api</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="back1.jpg">

<CENTER>&nbsp;</CENTER>

<TABLE BORDER=0 WIDTH="697" HEIGHT="100" >
<TR>
<TD><IMG SRC="empty.gif" HEIGHT=20 WIDTH=101></TD>

<TD>
<CENTER><B><FONT COLOR="#CC0000"><FONT SIZE=+2>Win32 JPG Api</FONT></FONT></B></CENTER>

<HR ALIGN=LEFT WIDTH="100%">I have been looking for a long time for a JPEG
package that will allow me to show a JPEG file in my program, espically
in FoxPro. I never found one that didn't cost hundreds of dollars and didn't
need complicated programming. Thanks for excellent works of Independent
JPEG Group's software of&nbsp; IJG JPEG library and thanks for CHRISDL@PAGESZ.NET's
MFC examples,&nbsp; I&nbsp; wrote a win32 JPG api dll by my myself.&nbsp;
You can call it to show a JPG file in your program by only one sentence:
<FONT COLOR="#3333FF">showjpg(fliename,hwnd,left,top). </FONT><FONT COLOR="#000000">No
more is needed to know.</FONT><FONT COLOR="#3333FF"> </FONT>Below is a
screen shot of a form of VFP5.0:&nbsp;
<BR><FONT COLOR="#FFFFFF">.</FONT>&nbsp;
<CENTER><IMG SRC="jpgapi.jpg" HEIGHT=300 WIDTH=340></CENTER>
<FONT COLOR="#FFFFFF">.</FONT>&nbsp;
<BR><FONT COLOR="#CC0000"><B>Win32 JPG API is composed of only four functions:</B>&nbsp;</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">1. long showjpg(char *fliename, long hwnd,
long left, long top)</FONT></B>&nbsp;
<BR><FONT COLOR="#000000">This function show a JPG file in a window at
(left,top). Here hwnd is handle of the window. If return 1, then all is
ok.</FONT>&nbsp;
<BR><FONT COLOR="#000000">Example: rs=showjpg("c:\jpgdemo\demo.jpg",hwnd,10,10)</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">2. long&nbsp; jpg_to_bmp(char *jpgfilename,
char *bmpfilename)</FONT></B>&nbsp;
<BR><FONT COLOR="#000000">This function copy a JPG file to a BMP file.
VB, VC, and FoxPro support BMP, so you can also show a JPG file by this
way.</FONT> <FONT COLOR="#000000">If return 1, then all is ok.</FONT>&nbsp;
<BR><FONT COLOR="#000000">Example: rs=jpg_to_bmp("c:\jpgdemo\demo.jpg","c:\temp\demo.bmp")</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">3. long to_clip(long hwnd, long type)</FONT></B>&nbsp;
<BR><FONT COLOR="#000000">This function copy a screen shot of a window(like
above) to the clipboard, then you can paste it to any picture program to
edit. Here type&nbsp; is type of copy(0=all window,1=client area).</FONT>&nbsp;
<BR><FONT COLOR="#000000">Example: rs=to_clip(hwnd,0)</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">4. long copy_to_bmp(long hwnd, char *bmpfilename,
long type)</FONT></B>&nbsp;
<BR><FONT COLOR="#000000">This function copy a screen shot of a window
to a BMP file. Here type&nbsp; is type of copy(0=all window,1=client area).</FONT>&nbsp;
<BR><FONT COLOR="#000000">Example: rs=copy_to_bmp("c:\temp\demo.bmp",hwnd,0)</FONT>&nbsp;
<BR><FONT COLOR="#FFFFFF">.</FONT>&nbsp;
<BR><B><FONT COLOR="#CC0000">Its usage is vary simple. Below is a example
of how to use it in Visual FoxPro. The form is like above.&nbsp;</FONT></B>&nbsp;
<BR><B><FONT COLOR="#3333FF">1.Init of form </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Declare
JPG Functions in foxjpg.exe)</FONT></FONT></B>&nbsp;
<BR>SET Library TO "c:\foxjpg\Foxtools.fll"&nbsp;
<BR>DECLARE long showjpg IN "c:\foxjpg\jpg.exe";&nbsp;
<BR>STRING name, long hwnd, long l, long t&nbsp;
<BR>DECLARE long jpg_to_bmp IN "c:\foxjpg\jpg.exe";&nbsp;
<BR>STRING name, STRING name1&nbsp;
<BR>DECLARE long showjpg IN "c:\foxjpg\jpg.exe";&nbsp;
<BR>STRING name, long hwnd, long l, long t&nbsp;
<BR>DECLARE long copy_to_bmp IN "c:\foxjpg\jpg.exe";&nbsp;&nbsp;
<BR>long hwnd, STRING name, long area&nbsp;
<BR><FONT COLOR="#000000">DECLARE long to_clip IN "c:\foxjpg\jpg.exe";</FONT>&nbsp;
<BR><FONT COLOR="#000000">long hwnd, long area</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">2.Click of Show Button </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Show
a JPG file in form)</FONT></FONT></B>&nbsp;
<BR>hwnd=_whtohwnd(_WGetPort( ))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// Get handle of this form&nbsp;
<BR>=showjpg("c:\foxjpg\mountain.jpg",hwnd,10,8)&nbsp;&nbsp;&nbsp;&nbsp;
// Show picture at (x=10,y=8)&nbsp;
<BR><B><FONT COLOR="#3333FF">3.Click of Copy Button </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Copy
Form to Clipboard)</FONT></FONT></B>&nbsp;
<BR><FONT COLOR="#000000">hwnd=_whtohwnd(_WGetPort( ))</FONT>&nbsp;
<BR><FONT COLOR="#000000">=to_clip(hwnd,0)</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">4.Click of CopyTo Button </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Copy
Form to a BMP&nbsp; file)</FONT></FONT></B>&nbsp;
<BR><FONT COLOR="#000000">hwnd=_whtohwnd(_WGetPort( ))</FONT>&nbsp;
<BR><FONT COLOR="#000000">=copy_to_bmp(hwnd,"c:\foxjpg\demo.bmp",0)&nbsp;</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">5.Click of SaveAs Button </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Save
a JPG file as a BMP&nbsp; file)</FONT></FONT></B>&nbsp;
<BR><FONT COLOR="#000000">=jpg_to_bmp("c:\foxjpg\cloud.jpg","c:\foxjpg\cloud.bmp")</FONT>&nbsp;
<BR><B><FONT COLOR="#3333FF">6.Click of Close </FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>(Close
form)</FONT></FONT></B>&nbsp;
<BR>clear dlls&nbsp;
<BR>thisform.release&nbsp;
<BR><FONT COLOR="#FFFFFF">.</FONT>&nbsp;
<BR><B><FONT COLOR="#000000"><A HREF="jpgapi.zip">Download a JPGAPI32(160KB)</A>&nbsp;</FONT><FONT COLOR="#FF6600"><FONT SIZE=-1>&nbsp;
(need mfc42d.dll)&nbsp;</FONT></FONT></B>&nbsp;
<BR><FONT COLOR="#FFFFFF">.</FONT>&nbsp;
<BR><B><FONT COLOR="#CC0000">Shareware Registration&nbsp;&nbsp;&nbsp;</FONT></B>&nbsp;
<BR>If you want to remove the unregister message, you can&nbsp; register
the software by paying to me US$20. This will encourage me to keep on&nbsp;
developing new programs and enhancing the old ones.&nbsp; My email is:
<A HREF="heliso@public.wuhan.cngb.com">heliso@public.wuhan.cngb.com</A>&nbsp;
<BR>.&nbsp;
<DIV ALIGN=right><B><A HREF="http://www.userworld.com/users/hlingso/remote.htm">Return&nbsp;</A></B></DIV>

<HR ALIGN=LEFT WIDTH="100%">
<CENTER>1998.12.20</CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<BLOCKQUOTE>
<CENTER>&nbsp;</CENTER>
</BLOCKQUOTE>
&nbsp;
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -