-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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로 이 부분만 수정해서 올리면 좋을 것 같아요~)
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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로 이 부분만 수정해서 올리면 좋을 것 같아요~)
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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로 이 부분만 수정해서 올리면 좋을 것 같아요~)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing ...
There was a problem hiding this 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" | ||
) |
There was a problem hiding this comment.
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() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file 작업 코드는 repository에서 직접 하는거보단 하위에 DataStore
나 Util
에서 하는게 맞아보입니다. 다음 페이즈에서 변경해봅시다~
[Issue] #59
[Descriptions]