Picture resizing

Post

Posted
Rating:
#1 (In Topic #1078)
Avatar
Guru
cogier is in the usergroup ‘Guru’
My camera produces up to 10Meg photos. I have discovered that FileChooser refuses to display a preview of large images. I can get the image into a PictureBox, but if I want to display many at once, the amount of memory used can cause my PC to lock up! If I reduce the size of the photos to less than a Meg everything is fine.

<IMG src="https://www.cogier.com/gambas/Image%20size.png"> </IMG>

Is there a way to reduce the picture inside a PictureBox without having to reduce the original photo? The Picture.Resize() cuts the picture which is not what I am looking for.

Unrelated discovery: -

In a post on this site If you wrap an image with a link, the image become clickable. Try clicking the image above.

Code

[url=http://link][img]http://MyPicture[/img][/url]
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
I got Benoit to add a FileView.MaxPreviewSize property
/comp/gb.form/fileview/maxpreviewsize - Gambas Documentation

Either set max size manually.

Or set to zero to use the default 4mb that used to be the only max size before I moaned about it <EMOJI seq="1f644" tseq="1f644">🙄</EMOJI>

Set it to -1 for unlimited size .

Code (gambas)

  1.   FileChooser1.FileView.MaxPreviewSize = -1
  2.  
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Guru
cogier is in the usergroup ‘Guru’
Thanks Bruce. I'll check this out tomorrow.

EDIT 20/08/2023

That's done it! Thanks. :D
Online now: No Back to the top

Post

Posted
Rating:
#4
Guru
BruceSteers is in the usergroup ‘Guru’

cogier said

Thanks Bruce. I'll check this out tomorrow.

EDIT 20/08/2023

That's done it! Thanks. :D

No worries.
I had the same problem once.

Benoit is pretty cool though when it comes to suggesting good ideas.
After adding this he has made a few more updates to fileview to improve previewing.

 8-)
Online now: No Back to the top
1 guest and 0 members have just viewed this.