如何更快解码JPEG文件? [关闭]

问题描述 投票:4回答:2

德尔福的默认JPEG库是极其缓慢。如何提高它的性能?我需要更快的保存和加载JPEG图像。

我只测试了Jpeg.TJPEGImage

performance delphi delphi-xe2 jpeg
2个回答
3
投票

你可以使用的libjpeg或libJpegTurbo。后者无疑是非常快的。

从单位:

{
libJPEG Header conversion by Steffen Xonna. (21-03-2008)

http://www.dev-center.de/index.php?cat=header&file=libjpeg


Below you find an copy from the original libJPEG header.

/* jpeglib.h
 *
 * Copyright (C) 1991-1998, Thomas G. Lane.
 * This file is part of the Independent JPEG Group's software.
 * For conditions of distribution and use, see the accompanying README file.
 *
 * This file defines the application interface for the JPEG library.
 * Most applications using the library need only include this file,
 * and perhaps jerror.h if they want to know the exact error codes.
 */
}

0
投票

我们有一个JPEG解压缩,将解压缩超过每秒350万像素(超过700万像素,如果在代码重新标记)。同时提取每秒超过3000缩略图。这不包括读取压缩代码到内存中的时间。看看www.instantimage.com。也很扎实,将解压许多JPEG图像的微软Windows软件不会。

© www.soinside.com 2019 - 2024. All rights reserved.