Commit 8ade24d
committed
docs(photo): the 1024px bound is on the shortest edge, not the longest (#1001)
Three comments claimed `minWidth`/`minHeight` cap the longest edge. They bound
the shortest one. flutter_image_compress takes
`max(1, min(width/minWidth, height/minHeight))` as its scale factor
(BitmapCompressExt.kt:62-66; UIImage+scale.m:12-21 picks the same branch), so
the smaller ratio wins and the edge landing on 1024 is the short one. A
4080x3072 camera frame comes out 1360x1024, not 1024x768 -- about 1.8x the
pixels the comments promised, and more again at 16:9.
Comments only; the calls are unchanged and the behaviour was always this.
Corrected in meal_photo_encoder.dart and user_image_storage.dart, where the
claim appeared twice each (dartdoc summary and the call site), and in
recipe_builder_screen.dart, which repeated it when explaining why it picks at
full resolution.
Found while checking docs/ai-architecture.md, which stated the same thing and
is corrected in #996.
(cherry picked from commit 202a21b)1 parent b031f13 commit 8ade24d
3 files changed
Lines changed: 18 additions & 12 deletions
File tree
- lib
- core/utils
- features
- add_meal/util
- recipes/presentation/screens
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
| 411 | + | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
0 commit comments