ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 WPD/DCIM avoid transferring thumbnails
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Oct 14 2016 :  11:42:58  Show Profile  Reply
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  Show Profile  Reply
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
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Oct 17 2016 :  06:18:36  Show Profile  Reply
Hi,

Many thanks -- that works very well.

Stuart

Stuart Clennett
Delphi Berlin 10.1
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Oct 17 2016 :  10:50:27  Show Profile  Reply
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

Go to Top of Page

xequte

38615 Posts

Posted - Oct 17 2016 :  18:17:15  Show Profile  Reply
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:

http://www.imageen.com/help/TIEAcquireParams.VisibleDialog.html


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Oct 18 2016 :  05:21:52  Show Profile  Reply
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
Go to Top of Page

xequte

38615 Posts

Posted - Oct 18 2016 :  18:45:26  Show Profile  Reply
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
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Oct 19 2016 :  04:29:04  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: