-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes output of capture to an image type rather than a byte array
- Loading branch information
Showing
4 changed files
with
52 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
indigo/indigo/src/main/scala/indigo/shared/ImageData.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package indigo.shared | ||
|
||
enum ImageType derives CanEqual: | ||
case JPEG, PNG, WEBP | ||
|
||
override def toString(): String = this match { | ||
case ImageType.JPEG => "image/jpeg" | ||
case ImageType.PNG => "image/png" | ||
case ImageType.WEBP => "image/webp" | ||
} | ||
|
||
final case class ImageData(size: Int, `type`: ImageType, data: Array[Byte]) |