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?

More than 1 year has passed since last update.

#画像を組み合わせて一枚の画像を作る方法です

スクリーンショット 2022-01-31 11 38 13

#複数の画像から新しい画像を作りたい
複数の画像を組み合わせて一枚の画像にするとなると、はて、どうすればいいのか、、、と改めて思いました。

#Contextに描画すればいい

UIGraphicsBeginImageContextWithOptions(CGSize(width: outputWidth, height: outputHeight), false, 0.0)

imageA.draw(in: drawRectA)
imageB.draw(in: drawRectB)
imageC.draw(in: drawRectC)

let assembledImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

Core MLやARKitを使ったアプリを作っています。
機械学習/AR関連の情報を発信しています。

Twitter
Medium

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?