File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ internal fun Part.toInternal(): InternalPart {
164
164
is TextPart -> TextPart .Internal (text)
165
165
is ImagePart ->
166
166
InlineDataPart .Internal (
167
- InlineDataPart .Internal .InlineData (" image/jpeg" , encodeBitmapToBase64Png (image))
167
+ InlineDataPart .Internal .InlineData (" image/jpeg" , encodeBitmapToBase64Jpeg (image))
168
168
)
169
169
is InlineDataPart ->
170
170
InlineDataPart .Internal (
@@ -186,7 +186,7 @@ internal fun Part.toInternal(): InternalPart {
186
186
}
187
187
}
188
188
189
- private fun encodeBitmapToBase64Png (input : Bitmap ): String {
189
+ private fun encodeBitmapToBase64Jpeg (input : Bitmap ): String {
190
190
ByteArrayOutputStream ().let {
191
191
input.compress(Bitmap .CompressFormat .JPEG , 80 , it)
192
192
return android.util.Base64 .encodeToString(it.toByteArray(), BASE_64_FLAGS )
You can’t perform that action at this time.
0 commit comments