Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
stuartclennett@gmail.com
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
7 L A T E S T R E P L I E S (Newest First)
stuartclennett@gmail.com
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
xequte
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???
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
Posted - Oct 17 2016 : 18:17:15 Hi Stuart
What error do you get when trying to attach?
This dialog comes from the WIA driver, so the only control you have over it is whether to show it or not:
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%
(Note, I tried the upload/attach - but it didn't seem to work, hence imgur.com)
Thanks, Stuart
Stuart Clennett Delphi Berlin 10.1
stuartclennett@gmail.com
Posted - Oct 17 2016 : 06:18:36 Hi,
Many thanks -- that works very well.
Stuart
Stuart Clennett Delphi Berlin 10.1
xequte
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;