問題タブ [magickwand]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
1551 参照

django - Django でのファイルの処理

ImageMagick とバインディング ワンドを使用して、Django にアップロードされた画像のサムネイルを生成しています。サムネイルをうまく生成できますが、画像オブジェクトを ImageMagick から Django モデルに戻す方法がわかりません。だから私は以下のように単純化されたモデルを持っています:

ValueError: The 'thumbnail' attribute has no file associated with it. これにより、 Is there a simple way to get a file object out of wand and into django without too much sillies?の最後の行でエラーが生成されます。

ありがとう。

0 投票する
3 に答える
132 参照

c - MagickWand が保持している画像の数を取得するにはどうすればよいですか?

それらを繰り返して数えることはできますが、画像の数を直接返す方法はありません。ありますか?

0 投票する
3 に答える
9333 参照

imagemagick - Python Magickwand pdfから画像への変換と画像のサイズ変更

PDFファイルのサムネイルを作成する必要があり、それを実現するためにImagemagickを使用しています。

Pythonmagick と wand を試して、pdf を画像に変換しました。ただし、変換された pdf のサイズを変更しようとすると、結果の画像が黒くなります。

-define pdf:use-cropbox=truePythonラッパーを使用して設定するオプションはあります か?

PDFをサムネイルに変換するPythonの他の方法はありますか?

コードは次のとおりです。

0 投票する
2 に答える
7760 参照

python - python wand で 2 つの画像を合成する

python wand (python の image-magick bindings) を使用して合成画像を作成する必要がありますが、前景画像を単にコピーして背景画像に貼り付ける以外の方法を理解するのに苦労しています。私が欲しいのは、次のような2つの画像がある場合です。

前景

ここに画像の説明を入力

どちらのjpegも、猫の白い背景を取り除いて部屋に貼り付けたいです。PIL などの他の python イメージ モジュールの回答も問題ありません。構成プロセスを自動化するために何かが必要なだけです。前もって感謝します。

0 投票する
0 に答える
769 参照

python - ImageMagick コマンドを Wand (Python) に変換するにはどうすればよいですか?

プログラムを Python に移行しようとしていますが、これが ImageMagick でいくつかの画像を処理するシェル スクリプトに依存している場合は別です。Python 用の ctypes ベースの ImageMagick バインディングである wand をインストールしましたが、元のコードを翻訳する方法がわかりません。

CONVERT と OPTIMIZE を使用するコマンド ライン コードを次に示します。

convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers optimize -write /path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1 -resize 200x200 /path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif

基本的に、スクリプトはタイムスタンプ付きの画像をダウンロードしたフォルダーに移動し、タイムスタンプの要件を満たす画像のみを含むアニメーション GIF を作成します。アニメーションフォルダーに保存します。次に、フレームを削除し、サイズを変更して、名前に「-t」を追加して、単一の gif 画像を同じフォルダーに保存することにより、そのアニメーション gif のサムネイルを作成します。

0 投票する
2 に答える
569 参照

php - Losing transparency of png with php magickwand and imagemagick when rotation is applied

Hi I'm porting a script from a windows environment running MagickWand 0.1.8 and ImageMagick 6.2.9 where transparency worked fine with MagickRotateImage.

New environment is linux running MagickWand 1.0.8 with ImageMagick 6.5.4-7 and transparency gets lost and it shows black as the background as soon as my logo image gets rotated.

From what I've found online, seems that PixelSetColor($bg,"none") doesn't work with the newer versions hence the black. Ultimately, I need to know what to replace PixelSetColor($bg,"none") with. I just don't have a background in image creation so struggling a bit with this.

First my php runs this function which makes a local 60x60 version of 600x600 png image gotten from a url.

then, I use this to read that locally written png image and rotate it:

I've tried things like adding:

Also tried adding MagickSetImageAlphaChannel($logo, MW_SetAlphaChannel); before the rotate step. Saw some posts mentioning that method but possibly that's not the correct way to use it. Not sure.

I also have the same problem in a script that draws a text string with a set font onto the image. Black immediately shows there even before rotation is applied so hoping same fix for the logo script will be useable by the font script.

Any help would be greatly appreciated. Thanks.

0 投票する
2 に答える
4706 参照

python - Pythonワンドを使用して画像をグレースケールする

ImageMagick http://wand-py.orgの Python API バインディングを使用して、画像を直接操作したいと考えています。ただし、ドキュメントからグレースケール変換の使用方法を推測することはできません。誰でもこの問題に関する情報を提供できますか?

0 投票する
2 に答える
715 参照

python - Wand Python マルチサイズ アイコン

Wandを使用してマルチサイズの ico を作成しようとしていますが、それについて話しているものは何も見つかりません。通常の ico への変換のみです...「シーケンス」が見つかりました:

https://wand.readthedocs.org/en/latest/roadmap.html

とシーケンスは必要なもののように見えますが、サンプルが複数の画像を読み込もうとしているだけで、作成方法がわかりません。何か不足していますか? または不可能ですか?

または PIL/PILLOW を使用して行うことは可能ですか?

0 投票する
1 に答える
1819 参照

python-3.x - Python 3 で Magick Wand または ImageMagick を使用してイメージを作成する

Python 3 の imagemagick と Magick wand に関するインターネット上の情報は十分ではありません。Python 3 を使用して多くの画像を作成し、背景色または背景画像を使用して画像を作成する必要があります。

必要な背景の画像を取得したら、好みのフォントでテキストを追加する必要があります。フォントの問題は解決できると思いますが、画像に「文字列」を追加するにはどうすればよいですか?

あとは「名前」をつけて画像を保存したい。Python 3 に Magick wand と Image Magick をインストールしましたが、ドキュメントの言語がよくわかりません。何か他のものをインストールする必要がありますか? あなたが私を助けることができれば、それは素晴らしいことです. ありがとうございました!