View Full Version : DLL for handling JPG and other formats
ErosOlmi
04-12-2007, 08:33
I found the library included in the attached file: NishitaView Version 1.1.4 .DLL picture viewer (32bit)
http://www.delphi32.com/vcl/589/
It seems we can use to load JPG and other graphics. Very easy to be used, see readme file.
What do you think? If you think we can use, I can embed in thinBasic official distribution.
Eros
Petr Schreiber
04-12-2007, 20:37
Thanks Eros,
I like the DLL is very small.
I will play with it more once I have more time.
Thanks,
Petr
catventure
04-12-2007, 20:53
Three are some interesting free image dll on Alyce Watson's site:
Image Loading DLL for Liberty BASIC 3+ !
jpegdll.zip (6 KB) Load JPEGs, GIFs and more.
Updated documentation March 10, 2004. Now includes call to DeleteObject for images returned by the DLL.
Here is a free, easy to use image loading DLL. It will load bitmaps (bmp), JPEGs (jpg), GIFs (gif), icons (ico), Windows metafiles (wmf) and enhanced metafiles (emf). It loads bitmaps THREE TIMES FASTER than the Liberty BASIC "loadbmp" command! It also includes functions to retrieve the width and height of the loaded image. It is only 24KB in size, much smaller than the nviewlib.dll, which is nearly 300KB.
Image323 DLL for Liberty BASIC 3+ !
image323.zip (18 KB) Load JPEGs, GIFs and more.
Updated documentation March 10, 2004. Now includes call to DeleteObject for images returned by the DLL.
A FREE image manipulation DLL for Liberty BASIC 3. Functions include color changes like tint, colorize and grayscale. It also has filtering functions like blur, sharpen and pixelate. Functions also include bitmap information functions, rotation, and more. This DLL manipulates images in memory and returns a handle to the new bitmap. It can then be loaded with LOADBMP, drawn with DRAWBMP and saved with BMPSAVE. The entire image will be drawn and saved, because this method doesn't require GETBMP to be used prior to saving the image. There is also a function to convert a bitmap to 24-bit format. LB saves bmps in the screen resolution, and some paint programs cannot open 32-bit bitmaps, so this function is very handy.
The DLL also includes support for loading jpg, bmp, ico, gif, wmf and emf image file formats! Load bitmaps THREE TIMES FASTER than the Liberty BASIC "loadbmp" command!
The DLL is released as FREEWARE, with no warantees expressed or implied.
http://alycesrestaurant.com/dll.htm
Maybe can be got to work in thinBasic? See .bas files included with free dll's.
catventure
Nice finds guys, but it would be nice to find one library that would also support png format along with what these libraries support.
ErosOlmi
04-12-2007, 21:55
What I was thinking about is a way to incorporate into thinCore.dll some special SDK interface functions (like thinBasic_ParseString or thinBasic_ParseNumber) to handle images. Than publish them to all modules in need of an image handle.
So something like:
thinBasic_ImgLib_Available
thinBasic_ImgLib_SupportedFormats
thinBasic_ImgLib_LoadImage
thinBasic_ImgLib_Width
thinBasic_ImgLib_height
...
So a set of unified interface functions avaibale for those developing modules.
Internally thinCore.dll would take care of the implementation maybe interfacing to different libs depending on what is available in the running system: GDI+ (if available), nviewlib (if available), jpegdll (if available), image323 (if available), ... and so on.
The important is to expose always the same interface functions.
Just thinking ...
Petr Schreiber
04-12-2007, 22:01
Eros,
this is very strong idea!
It would make module development very fast.
Thanks,
Petr
I agree, a wonderful idea Eros!!!!
Michael Hartlef
05-12-2007, 08:29
That sound pretty good. :)
RobertoBianchi
05-12-2007, 10:49
Eros,
please note that it'is very important that the core does not rely upon on others library that those of Windows and ThinBASIC.
Ciao,
Roberto
ErosOlmi
05-12-2007, 11:38
Yes Roberto, you are right.
Another option is to create a double interface module able to load new keywords into thinBasic language when loaded by a script but at the same time exporting some functions to be used by other modules directly.
...