Skip to content

Refactor: Rename encodeBitmapToBase64Png to encodeBitmapToBase64Jpeg #6905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Apr 23, 2025

The private function encodeBitmapToBase64Png in firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt was already compressing Bitmap images to JPEG format, not PNG.

This commit renames the function to encodeBitmapToBase64Jpeg to accurately reflect its behavior. The single call site within the same file has also been updated.

no-changelog

The private function `encodeBitmapToBase64Png` in `firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt` was already compressing Bitmap images to JPEG format, not PNG.

This commit renames the function to `encodeBitmapToBase64Jpeg` to accurately reflect its behavior. The single call site within the same file has also been updated.
Copy link
Contributor

github-actions bot commented Apr 23, 2025

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@rlazo rlazo requested a review from davidmotson April 23, 2025 18:56
Copy link
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v10.0

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

Copy link
Contributor

Test Results

 18 files   -  48   18 suites   - 48   14s ⏱️ - 1m 5s
 86 tests  - 466   86 ✅  - 465  0 💤  - 1  0 ❌ ±0 
172 runs   - 932  172 ✅  - 930  0 💤  - 2  0 ❌ ±0 

Results for commit c438b82. ± Comparison against base commit 534cc53.

This pull request removes 552 and adds 86 tests. Note that renamed tests count towards both.
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ descriptor should have expected values
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ deserialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ serialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Boolean) creates an object with the expected value
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (normal cases)
…
com.google.firebase.vertexai.GenerativeModelTesting ‑ exception thrown when using invalid location
com.google.firebase.vertexai.GenerativeModelTesting ‑ system calling in request
com.google.firebase.vertexai.SchemaTests ‑ basic schema declaration
com.google.firebase.vertexai.SchemaTests ‑ full schema declaration
com.google.firebase.vertexai.SerializationTests ‑ test Candidate serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test GenerateContentResponse serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test Schema serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test countTokensResponse serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test modalityTokenCount serialization as Json
com.google.firebase.vertexai.VertexAIStreamingSnapshotTests ‑ citation parsed correctly
…

@rlazo rlazo marked this pull request as ready for review April 23, 2025 23:24
@rlazo rlazo merged commit d568e84 into main Apr 23, 2025
32 of 34 checks passed
@rlazo rlazo deleted the vertexai-rename-bitmap-encoder branch April 23, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants