0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ChatGPT+Code Interpreter】で文字列の文字が回転するアニメGIFを作成します。

Posted at

 どうも、カーブミラーです。

 今回は、文字列の文字が回転するアニメGIFを作成します。

本記事は、ChatGPT(有料版)
で行なっております。画像は
あります。 あしからず。

 ニュースはないので、
  さっそく本題です。

 文字列の文字が
  回転するアニメGIFを作成します。

 出来上がりがこちら。
rotating_text (1).gif

 Promptがこちらです。

# CodeInterpreterで文字列処理

### 初期設定
1. 画像のサイズ: `width = 512`, `height = 512`
2. 背景色: `bg_color = (255, 255, 255)` (白)
3. テキスト: `text = "I am a ChatGPT."`
4. テキストの色: `text_color = (0, 0, 0)` (黒)
5. フォントサイズ: `font_size = 48`
6. フォントパス: `font_path = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"`
7. フレーム数: `frames = 60` (1秒あたり30フレーム)

### 注意事項
コード不要。
確実に実行せよ。

### 処理内容
1. 白い正方形画像を作成する。
2. 画像中央にテキストを描画する。
3. [中央で、文章の一文字一文字が回転する5秒の]アニメーションGIFを作成する。
    - 各フレームにおけるテキストの位置を計算して配置する (`x`, `y`)
4. GIFを保存する (`gif_path`).

 ごらんのように
  文字が回転するのは
   あんまり使い道がありそうに
    ないですよね😅

 みなさんの
  作品制作の糧に
   なれば、幸いです。

 今回は、ここまで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?