Author |
Topic |
|
stuartclennett@gmail.com
United Kingdom
72 Posts |
Posted - Oct 14 2016 : 11:42:58
|
Hi,
I'm new to ImageEn & acquisition, so I'm using the AllAcquire demo as a basis for my own acquisition code.
As WPD/DCIM devices don't seem to have a UI, is there any way I can avoid transferring images that are under a certain size? For instance, I'm testing with my phone and it has loads of images that are 384x512, 375x25, etc, etc.
At the moment I'm removing the image from the ImageEnMView component as soon as it's loaded if the dimensions are small in the Progress event.
Is there a way to avoid transferring in the first place?
Many thanks Stuart
Stuart Clennett Delphi Xe2 |
|
xequte
38615 Posts |
Posted - Oct 17 2016 : 00:50:04
|
Hi Stuart
You should be able to do this using the OnAcquireBitmap event:
procedure TForm1.ImageEnMView1AcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: boolean);
begin
// Skip retrieval of images on WPD devices that are less than 500x500 pixels
If ( ABitmap.Width < 500 ) or ( ABitmap.Height < 500 ) then
Handled := True;
end;
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
stuartclennett@gmail.com
United Kingdom
72 Posts |
Posted - Oct 17 2016 : 06:18:36
|
Hi,
Many thanks -- that works very well.
Stuart
Stuart Clennett Delphi Berlin 10.1 |
|
|
stuartclennett@gmail.com
United Kingdom
72 Posts |
Posted - Oct 17 2016 : 10:50:27
|
Hi,
Sorry to ressurect this - I wondered if there's a way to control the display of images in the WIA interface? Potentially users will attempt to download the thumbnail images & then nothing will appear?
This is the UI I'm talking about in case my terminology isn't 100%
http://i.imgur.com/x8MF4e0.jpg
(Note, I tried the upload/attach - but it didn't seem to work, hence imgur.com)
Thanks, Stuart
Stuart Clennett Delphi Berlin 10.1
|
|
|
xequte
38615 Posts |
|
stuartclennett@gmail.com
United Kingdom
72 Posts |
Posted - Oct 18 2016 : 05:21:52
|
Hi Nigel,
Thanks for the link to the help system.
The "Image" button in the toolbar of the topic editor _appeared_ to work okay - image was uploaded - but it just didn't appear in the final message. I just got a "missing image" icon instead.
Much like your reply above - there's no image here.
Cheers
Stuart Clennett Delphi Berlin 10.1 |
|
|
xequte
38615 Posts |
Posted - Oct 18 2016 : 18:45:26
|
Hi Stuart
The image I uploaded i failed to retrieve correctly from the imgur link. It is working now. Not sure why it failed for you, perhaps invalid characters in the filename???
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
stuartclennett@gmail.com
United Kingdom
72 Posts |
Posted - Oct 19 2016 : 04:29:04
|
Hi Nigel,
Thanks for looking into it - I'll watch out for the filename issues in future - altho imgur is easy enough to use which works well.
Cheers
Stuart Clennett Delphi Berlin 10.1 |
|
|
|
Topic |
|