Skip to content
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

Generate Image [#59] #74

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Generate Image [#59] #74

merged 1 commit into from
Oct 10, 2024

Conversation

ing03201
Copy link
Member

@ing03201 ing03201 commented Oct 9, 2024

[Issue] #59
[Descriptions]

  • 촬영 후 이미지 생성 완료
  • SingleRowImage / TwoRowImage 두 이미지 저장

@ing03201 ing03201 requested review from DokySp and fetiu October 9, 2024 14:38
@ing03201 ing03201 self-assigned this Oct 9, 2024
@ing03201 ing03201 added feature/UI feature-ui feature/external feature-external feature/etc feature-etc labels Oct 9, 2024
@ing03201 ing03201 added this to the Phase 2 milestone Oct 9, 2024
DokySp
DokySp previously approved these changes Oct 10, 2024
Copy link
Member

@DokySp DokySp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많았습니다. 우선 Approve 하는데요, 위에 코멘트는 전부 확인하고 반응&답변 부탁드립니다~

코드를 봤을 때 아래처럼 동작하는 것으로 보이는데요, 제가 이해한게 맞다면 사용자한테도 한장 / 두장짜리 이미지가 보이는 것인지 질문합니다~
CameraScreen -> GenerateSingleRowImageScreen -> GenerateTwoRowImageScreen -> ShareScreen

@@ -3,7 +3,7 @@ package com.foke.together.util
object AppPolicy {
const val isDebugMode = true

const val DEFAULT_EXTERNAL_CAMERA_IP = "0.0.0.0"
const val DEFAULT_EXTERNAL_CAMERA_IP = "192.168.0.71:5000"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IP는 0.0.0.0으로 고정했으면 합니다~
그리고 아래 두 값이 같은거 같은데 추후 통합이 필요해보입니다 😄
(다음 PR로 이 부분만 수정해서 올리면 좋을 것 같아요~)

  • DEFAULT_EXTERNAL_CAMERA_IP
  • EXTERNAL_CAMERA_DEFAULT_SERVER_URL

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 수정하였습니다

@@ -4,7 +4,18 @@ import java.text.SimpleDateFormat
import java.util.Date

object TimeUtil {
fun getCurrentDisplayTime(): String {
fun getCurrentTime(): String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getCurrentTime(), getCurrentTimeSec() 함수가 중복됩니다.
저는 개인적으로 이름이 getCurrentDisplayTime(), getCurrentTimeSec() 을 사용하는 것이 좋아보이는데요, 혹시 이전처럼 이렇게 사용하는것은 어떨까요? ㅎㅎ
만약 이전 코드 방식의 네이밍을 사용한다면 코드 원복하는 작업 진행이 필요해보입니다!
(다음 PR로 이 부분만 수정해서 올리면 좋을 것 같아요~)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다 현 내용의 getCurrent DisplayTime으로 변경하였습니다

suspend fun generateImage(graphicsLayer: GraphicsLayer) {
val bitmap = graphicsLayer.toImageBitmap().asAndroidBitmap()
val finalExternalImageUri = generatePhotoFrameUseCase.saveGraphicsLayerImage(bitmap, "final_two_row")
val finalInternalImageUri = generatePhotoFrameUseCase.saveFinalImage(bitmap, "final_two_row")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 final_single_row, final_two_row 로 파일 이름을 고정해둔 것 같은데요,
AppPolicy로 빼두면 좋을 것 같습니다~
(다음 PR로 이 부분만 수정해서 올리면 좋을 것 같아요~)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 AppPolicy로 빼두었습니다

suspend fun generateImage(graphicsLayer: GraphicsLayer) {
val bitmap = graphicsLayer.toImageBitmap().asAndroidBitmap()
val finalExternalImageUri = generatePhotoFrameUseCase.saveGraphicsLayerImage(bitmap, "final_single_row")
val finalInternalImageUri = generatePhotoFrameUseCase.saveFinalImage(bitmap, "final_single_row")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 final_single_row, final_two_row 로 파일 이름을 고정해둔 것 같은데요,
AppPolicy로 빼두면 좋을 것 같습니다~
(다음 PR로 이 부분만 수정해서 올리면 좋을 것 같아요~)

Copy link
Member

@DokySp DokySp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing ...

Copy link
Member

@DokySp DokySp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했습니다~

val file = File(
context.cacheDir,
fileName + ".jpg"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우선 지금은 cache로 가고
나중에 cacheDir하고 filesDir 중 어떤 것으로 할지 의논하면 좋을 것 같습니다 😄
(기능적인 부분이라기 보단 정하기 나름인것으로 보여)

context.cacheDir.listFiles().forEach {
if(it.name.contains(".jpg")){
it.delete()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file 작업 코드는 repository에서 직접 하는거보단 하위에 DataStoreUtil에서 하는게 맞아보입니다. 다음 페이즈에서 변경해봅시다~

@ing03201 ing03201 merged commit c88b989 into FoKE-Developers:main Oct 10, 2024
1 check passed
@DokySp DokySp removed this from the Phase 2 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/etc feature-etc feature/external feature-external feature/UI feature-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GeneratePhotoFrameUseCase / GetCutFrameSourceTypeUseCase / SetCutFrameSourceTypeUseCase 생성
2 participants