TJPEGImage component version 1.3 Luciano Bajo Eloy - Sep 9, 1997
Madrid, Spain
E-mail: lbe20@tid.es
Andreas Hoerstemeier - May 17, 1998
Aachen, Germany
E-Mail: andy@hoerstemeier.de
WWW: http://www.westend.de/~hoerstemeier
-------------------------------------------------------------------------------
Note on Version 1.3: This version now adds the ability to save the JPEG
as well as a TDBJPEGImage. For details see the
New Features section.
-------------------------------------------------------------------------------
Important note: I (Luciano) have changed my job. I do not work with Delphi
currently, I use Visual C++ (I hate it, but such is life).
That means that I cannot reply several mails a day pertaining
to TJPEGImage. Instead I have included the source code. If
you have any problems, you will have to modify the code by
yourself. Please, do not send me E-mails unless it is truly
necessary.
Note on installation: Select the file JpgImgR.pas when installing the component
-------------------------------------------------------------------------------
Index:
0. Answers to common questions and requests
1. New features (from version 1.0 to 1.1 and 1.2)
2. Introduction
3. JPEGImage properties and events
3a. DBJPEGImage additional properties and events
4. Remarkable features
5. Known limitations (future improvements?)
6. Distribution and source code
7. Information and libraries on JPEG compression
-------------------------------------------------------------------------------
0. Answers to common questions and requests
-------------------------------------------------------------------------------
Basically, all of the E-mails I have received pertaining to TJPEGImage
fall into one of these topics:
-Requests for source code. Well, I did not provide the source code
with TJPEGImage 1.0 (I sended it on request) as a mean to know if the
component was being used. The result is that many people have requested it
and I have had to send several mails a day with the code attached. To avoid
this, I provide the full source code with this version.
-Support for Delphi 3.0. Delphi 3.0 adds support for JPEG files so
TJPEGImage is no longer required. Drop a TImage on a form (Image1, for
example), add jpeg.pas to the uses clause and load a JPEG file with
Image1.Picture.LoadFromFile. However this component also runs with D3 since
V1.2, only a bit slower than the Delphi one.
-Loading pictures from a stream. TJPEGImage does not support loading
pictures from a stream. If you need that feature you will have to modify
the code, I think it will not be difficult. (Obsolete, added with V1.2)
-Coding JPEG images. TJPEGImage is a decoder, not a coder. That means
that you can view JPEG files, but you cannot save files as JPEG. (Obsolete,
added with V1.3).
-------------------------------------------------------------------------------
1. New features (from version 1.0 to 1.1 and 1.2)
-------------------------------------------------------------------------------
From Version 1.0 to 1.1
-Finally, FileName has its own property editor by courtesy of Keith
Anderson, who sent me the code by E-mail.
-A new property and a new event have been added for indicating the
progress of the decompression (see section 2 for details).
-A bug has been fixed. When a corrupted JPEG file was loaded into
the component the file was being left open. Any further action on this file
generated a Sharing Violation exception (IOResult = 32). The bug has been
reported and fixed by Derek (sorry, I do not know your last name).
From Version 1.1 to 1.2 (changes done by Andreas Hoerstemeier)
-The component can now also load the image from any stream, it now has
a LoadFromStream method, so it can also be used to display files out of a
database (TBlobStream) or downloaded from the web without the need of a
temporary file.
-As the whole PasJPG library didn't include any 32bit specific parts
the component could be modified easily for Delphi 1 (but note it is slow there
compared to Delphi 2), and in the same way to work with Delphi 3, too. It may
also run in C++ Builder, but I've no chance of testing this.
From version 1.2 to 1.3 (changes done by Andreas Hoerstemeier)
-The coding part of the JPEG library is now also included and
connected to the component.
-A new TDBJPEGImage is included which allows to you to link a BLOB
field containing JPEG images to a visual control easily.
From version 1.3 to 1.4 (changes done by Andreas Hoerstemeier)
-New property Comment to link to the optional comment within the
JPEG file.
-------------------------------------------------------------------------------
2. Introduction
-------------------------------------------------------------------------------
JPEGImage is based on the work of NOMSSI NZALI Jacques H. C., author
of the PASJPEG library (http://www.tu-chemnitz.de/~nomssi/pub/pasjpeg.zip).
On his own words, PASJPEG is a port of the sixth public release of the IJG
(Independent JPEG Group) C source (release 6a of 7-Feb-96), that implements
JPEG baseline, extended-sequential, and progressive compression processes to
Turbo Pascal 7.0 for DOS (TP).
My goal was to get a Delphi component for decompressing and viewing
JPEG images. So I began from DJPEG.PAS, a DOS program written by Thomas G.
Lane included in the PASJPEG library for translating JPEG files to BMP or
TARGA files. My work has consisted of the following steps:
1. Create a new component inherited from TImage.
2. Change command line options in DJPEG to properties in TJPEGImage.
3. Fit the output in a memory stream instead of a disk file.
4. Change WriteLn and Halt procedures to Delphi exceptions.
5. Put the library on a diet, that is, delete unnecessary files and
code.
Once those steps where covered, I found a problem in 256 colors video
mode: the first image loaded had the right colors, but successive images
caused the color palette to become corrupted. Fortunately, I was a little
luck and I could solve the problem.
-------------------------------------------------------------------------------
3. JPEGImage properties and events
-------------------------------------------------------------------------------
The properties of TJPEGImage are (apart from those in TImage):
-FileName: Name of the JPEG file.
-NumOfColors: Colors of the resulting image. Possible values are _16,
_256, or TrueColor. DO NOT use TrueColor in 256 video modes or
the colors in the image will become distorted. (Default 256).
Not used for saving as JPEG images can only be true color or
grayscale.
-DCTMethod: Method used for the Discrete Cosine Transform in JPEG
algorithms. Possible values are Integ (default), FastInteg
(faster but less accurate) or FloatingPoint (more accurate
but slower).
-Dither: Possible values are none (do not use dithering in
quantization), FS (default) or ordered (medium speed, quality).
Not for saving.
-GrayScale: Force grayscale output (default False).
-NoSmooth: Do not use high-quality upsampling (default False).
Loading only.

yxkfw
- 粉丝: 82
- 资源: 2万+
最新资源
- java图书管理系统(源码+数据库+开题报告+两份毕业论文).zip
- java学生教务系统管理系统(源码+数据库+开题报告+两份毕业论文).zip
- 电机模型中的电压方程、PI控制器与PLL锁相环的标幺化处理详解及采样时间研究,电机模型中的电压方程、PI控制器与PLL锁相环的标幺化处理详解及采样时间研究,电压方程标幺化、PI标幺化、锁相环PLL标幺
- 语音编辑软件,用于处理语音用于大模型训练
- 基于SSM的高校图书管理系统-源码+数据库
- COMSOL模拟燃料电池冷启动过程:温度、电流、物质浓度等分布研究,COMSOL燃料电池冷启动仿真模型:探索冰形成、温度电流分布及物质浓度等特性,三种启动方式全面解析,COMSOL 燃料电池,冷启动仿
- 基于OpenSees平台建立的单柱墩模型:考虑滑移粘接捏缩效应,包含建模全过程、钢筋混凝土粘接滑移及位移控制滞回分析代码实践,基于OpenSees平台建立的单柱墩模型滑移粘接分析及其建模全过程与滞回分
- “国家级大数据综合试验区”试点城市DID(2000-2022年).zip
- deepseekr1 技术报告,中文版
- 群智能算法优化BP神经网络:结合思维进化算法与两层BP,高效全局搜索与局部优化,预测回归数据新策略,基于思维进化算法优化BP神经网络:全局搜索与局部拟合的高效组合,两层BP预测回归新探 ,群智能算法优
- 基于STM32F4xx的永磁同步电机(PMSM)控制器电路设计及其Simulink模型代码自动生成研究,基于STM32F4xx的永磁同步电机(PMSM)控制器电路设计及其Simulink模型代码自动生
- 最全面的MTK手机开发平台MTK资料大全(最新版)
- 机器视觉技术:OpenCV与Qt驱动的工业相机图像采集与处理实践-卡尺工具辅助下的找线、找圆、颜色检测及模板与形状匹配算法封装与调用,机器视觉技术:OpenCV与Qt驱动的工业相机图像采集与处理全解
- PSI5标准协议:V2.1
- 基于MATLAB的智能优化:改进带记忆模拟退火算法在TSP问题中的应用及性能测试,基于MATLAB的带记忆模拟退火算法:TSP问题求解及多普勒降温曲线应用研究,基于matlab的改进的带记忆的模拟 火
- 8.python-OpenCV2024-10-05.wmv
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


