3

ユーザーが写真/画像のコレクションを構築できるようにするイメージマネージャーを構築し、これらの写真を単一のEXEに変換するオプションを提供する必要があります。実行すると、ターゲットPC上の写真/画像が全画面スライドショー。

複数の画像に対してこれを行うことは可能ですか?

4

4 に答える 4

5

Should be possible. What you'll have to do is a EXE framework (stub) that reads its own binary and checks for an appended image list (can be something simple like [number of images][image sizes][image_1]...[image_n]) and displays those in a slide show.

You can then concatenate the EXE stub, the image information and the images for your final slide show EXE.

Searching for the end of the EXE file (beginning of the image list) is usually done by using a constant header that does not appear in the EXE file, knowing the size of the stub EXE or writing the image list offset at the end of the EXE file. Alternatively, you can store the information the other way round and start reading from the end of the file.

Here is something that looks like a good link for stub example code.

于 2010-07-16T07:06:49.920 に答える
2

IrfanView はすでにそれを行うことができます:
http://www.irfanview.com/
exe ファイルから再度解凍することさえできます。

于 2010-07-16T12:18:40.677 に答える
0

独自のリソースを列挙し、それらを表示用にロードするアプリケーションを構築できます。これは、エンド ユーザーがスライド ショー用に実行するものです。別のアプリで、ユーザーが選択したリソースを最初のリソースに追加できます。リソースの追加に関する情報については、 UpdateResourceの MSDN ドキュメントを参照してください。リソースの列挙に関する情報については、 EnumResourceNamesを参照してください。

于 2010-07-16T13:09:45.050 に答える
0

exe にバンドルされている (またはバンドルされていない) .zip アーカイブを読み取るための無料のオープン ソース クラスをいくつか提供しました。したがって、任意の .zip アーカイブを exe に追加し、この .zip 内の任意の画像を 1 つのクラスで抽出できます。

次の方法を使用します。

constructor TZipRead.Create(const aFileName: TFileName; ZipStartOffset, Size: cardinal);

そして paramstr(0) - つまりあなたの exe - を aFileName として提供し、ZipStartOffset を最小の元の exe サイズとして提供します: このオフセットから .zip ファイルの先頭を検索します。サイズ パラメータを 0 のままにします。ファイル サイズ自体からサイズを取得します。

必要に応じて、同じクラスで .zip アーカイブをリソースとして exe に埋め込むことができます。

.zip コンテンツを exe に追加するには、次の 2 つの方法があります。

  1. copy /b original.exe+pictures.zip newembedded.exe を使用
  2. 提供されている TZipWrite クラスとその AddFromZip() メソッドを使用して、Delphi コードから exe を作成します。一時的な pictures.zip ファイルを使用せずに、その場で画像を圧縮して追加することもできます。

http://synopse.info/forum/viewtopic.php?pid=163を参照してください。

于 2010-07-17T10:01:14.647 に答える