Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Go Back   Foros Club Delphi > Principal > Gráficos
Register FAQ Members List Calendar Guía de estilo Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22/01/2007
Roberto Angulo Roberto Angulo is offline
Registrado
 
Join Date: Aug 2005
Posts: 6
Poder: 0
Roberto Angulo Va por buen camino
DelphiTwain: Accesar propiedades de Scanner

Saludos:
Necesito ayuda sobre como establecer las propiedades del scanner desde Codigo, necesito establecer resolución, escala, modo , etc. y adquirir imagen desde un TButton

Lo único que he podido hacer es fijar su modo de transferencia (Archivo) y su formato (JPG)

Gracias por la atención.
Reply With Quote
  #2  
Old 22/01/2007
kalisto kalisto is offline
Miembro
 
Join Date: Jul 2004
Posts: 62
Poder: 23
kalisto Va por buen camino
En la pagina http://Torry.net seguro que encuentras mas de un componente que te permita hacer lo que pretendes.
Reply With Quote
  #3  
Old 23/01/2007
Roberto Angulo Roberto Angulo is offline
Registrado
 
Join Date: Aug 2005
Posts: 6
Poder: 0
Roberto Angulo Va por buen camino
Estableciendo Propiedades de DelphiTwain

Gracias por la atención, esto es lo que llevo y voy resolviendo el asunto

Code:
 
Código Delphi [-]
 
procedure TfrmEmpleados.JvBtnObtener_ActaClick(Sender: TObject);
var
  SourceIndex: Integer;
  XV : WORD ;
begin
  //Try loading the library
  if Twain.LoadLibrary then
  begin
    //Same as SourceManangerLoaded := TRUE
    Twain.LoadSourceManager();
    //Select the source
    SourceIndex := Twain.SelectSource();
    if SourceIndex <> -1 then
      BEGIN
      with Twain.Source[SourceIndex] do
      begin
        //Prepare for transfering using ttmFile mode
        Loaded := TRUE;
        TransferMode := ttmFile;
        ShowUI := False ;
        Enabled := TRUE;
        SetIXResolution(200) ;
      end ;
      END
    else ShowMessage('Cancelado')
  end
  else MessageDlg('No Está Instalado el Controlador Twain NECESARIO', mtError, [mbOK], 0)
end;
Reply With Quote
  #4  
Old 24/01/2007
Roberto Angulo Roberto Angulo is offline
Registrado
 
Join Date: Aug 2005
Posts: 6
Poder: 0
Roberto Angulo Va por buen camino
DepjiTwain: Accediendo a sus propiedades

Esta funcion es parte de DelphiTwain

Código Delphi [-]
 
{Sets an one value capability}
function TTwainSource.SetOneValue(Capability: TW_UINT16;
  ItemType: TW_UINT16; Value: Pointer): TCapabilityRet;
var
  Data: HGLOBAL;
  OneV: pTW_ONEVALUE;
  ItemSize,ItemSize2: Integer;
begin
  {Allocate enough memory for the TW_ONEVALUE and obtain pointer}
  ItemSize := TWTypeSize(ItemType);
  //npeter: TW_ONEVALUE minimal size !!!
  //I think to meet the specifications the
  //Item's size must be at least sizeof(TW_UINT32)!
  //when I did it, some mistic errors on some drivers went gone
  if ItemSizethen ItemSize2:=TWTypeSize(TWTY_UINT32) else ItemSize2:=ItemSize;
  Data := GlobalAlloc(GHND, sizeof(OneV^.ItemType) + ItemSize2);
  OneV := GlobalLock(Data);
  {Fill value}
  OneV^.ItemType := ItemType;
  CopyMemory(@OneV^.Item, Value, ItemSize);
  GlobalUnlock(Data);
  {Call method to set}
  Result := SetCapabilityRec(Capability, TWON_ONEVALUE, Data);
  {Unload memory}
  GlobalFree(Data);
end;
Reply With Quote
  #5  
Old 24/01/2007
Roberto Angulo Roberto Angulo is offline
Registrado
 
Join Date: Aug 2005
Posts: 6
Poder: 0
Roberto Angulo Va por buen camino
DepjiTwain: Accediendo a sus propiedades

y estas son valores que aparecen en la Unidad Twain


Código Delphi [-]

ICAP_JPEGQUALITY = $1153; { Added 1.9 }
{$EXTERNALSYM ICAP_JPEGQUALITY}



{ ICAP_JPEGQUALITY values (JQ_ means jpeg quality) }
TWJQ_UNKNOWN = -4;
{$EXTERNALSYM TWJQ_UNKNOWN}
TWJQ_LOW = -3;
{$EXTERNALSYM TWJQ_LOW}
TWJQ_MEDIUM = -2;
{$EXTERNALSYM TWJQ_MEDIUM}
TWJQ_HIGH = -1;
{$EXTERNALSYM TWJQ_HIGH}







Espero puedan ayudarme a establecer la Calidad del JPG, pues deseo que tenga calidad sin que el tamaño del Archivo sea muy grande
Reply With Quote
  #6  
Old 31/07/2008
mrnovice's Avatar
mrnovice mrnovice is offline
Miembro
 
Join Date: Oct 2006
Posts: 163
Poder: 20
mrnovice Va por buen camino
Saludos

Quizás te sirva, en twain.org viene el estàndar TWAIN1.9 pdf creo el 2 ya salió en este manualito jeje, vienen primordialmente triplets y capacidades creo que lo que buscas son capacidades, en el manual de DelphiTwain viene como usar esas capacidades, las capacidades como ICAP_XRESOLUTION, te permiten manipular las propiedades del dispositivo, sólo tienes que buscar en TWAIN1.9PDF lo que quieres modificar eso sì està en inglés, suerte espero que te haya servido cualquier duda notificalo.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Acceso a las propiedades de un objeto desde el editor de propiedades Hugo OOP 0 24/11/2006 12:58
Accesar a las propiedades de otros objetos sharky Varios 2 07/12/2004 23:58
leer datos del scanner raudelink Varios 2 16/10/2004 02:13
scanner huellas digitales jheynoxs Varios 1 08/01/2004 19:46
Scanner Aztaroth Varios 1 18/12/2003 20:11


All times are GMT +2. The time now is 01:52.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi