little changes to thumbnails / image load/unload constants
This commit is contained in:
parent
f83d7f13aa
commit
7b8c64d8be
10
Program.cs
10
Program.cs
@ -438,7 +438,7 @@ public class UiGeometry {
|
||||
public UiGeometry(Vector2i windowSize) {
|
||||
WindowSize = windowSize;
|
||||
|
||||
int numThumbnails = 20;
|
||||
int numThumbnails = 15;
|
||||
int thumbnailHeight = WindowSize.Y / numThumbnails;
|
||||
int thumbnailWidth = (int) 1.0 * thumbnailHeight * activeCamera.Resolution.X / activeCamera.Resolution.Y;
|
||||
for (int i = 0; i < numThumbnails; i++) {
|
||||
@ -707,7 +707,7 @@ public class Game : GameWindow {
|
||||
// string[] files = Directory.GetFiles(@"c:\users\colin\pictures\photos\2023\07\14\");
|
||||
// string[] files = Directory.GetFiles(@"G:\DCIM\100EOSR6\");
|
||||
// string[] files = Directory.GetFiles(@"C:\Users\colin\Pictures\photos\2018\06\23");
|
||||
string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\105D7000");
|
||||
string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\Germany all\104D7000");
|
||||
// string[] files = Directory.GetFiles(@"C:\Users\colin\Desktop\many-birds\");
|
||||
|
||||
for (int i = 0; i < files.Count(); i++) {
|
||||
@ -736,9 +736,9 @@ public class Game : GameWindow {
|
||||
}
|
||||
|
||||
private async void LoadAndUnloadImagesAsync() {
|
||||
int minUnloadedImage = Math.Max(0, photoIndex - 40);
|
||||
int maxUnloadedImage = Math.Min(photoIndex + 40, photos.Count - 1);
|
||||
int minLoadedImage = Math.Max(0, photoIndex - 20);
|
||||
int minUnloadedImage = Math.Max(0, photoIndex - 20);
|
||||
int maxUnloadedImage = Math.Min(photoIndex + 30, photos.Count - 1);
|
||||
int minLoadedImage = Math.Max(0, photoIndex - 10);
|
||||
int maxLoadedImage = Math.Min(photoIndex + 20, photos.Count - 1);
|
||||
// First, unload images that are far outside our window.
|
||||
// FIXME: also cancel any in-progress loading tasks that have moved outside our window.
|
||||
|
Loading…
Reference in New Issue
Block a user