Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-07-2015
shoulder shoulder is offline
Miembro
 
Registrado: abr 2008
Posts: 441
Poder: 17
shoulder Va por buen camino
Rotacion con Twain en Delphi

Hola cuando escaneo una imagen con delphi no me aparece en el menu la opcion de rotacion solamente de color de imagen o brillo estoy usando los siguientes comandos.

Código Delphi [-]

    Twain.LoadLibrary;
    Twain.LoadSourceManager;
    Twain.Source[CurrentSource].Loaded := TRUE;
    Twain.Source[CurrentSource].SetIPixelType(tbdGray);
    Twain.Source[CurrentSource].TransferMode := Self.TransferMode;
    Twain.Source[CurrentSource].SetIXResolution(200-00);
    Twain.Source[CurrentSource].SetIYResolution(200-00);
    ClearImageList; {Clear list of images}
    Twain.Source[CurrentSource].EnableSource(ItemShowInterface.Checked, FALSE);
    Twain.Source[CurrentSource].TransferMode := Self.TransferMode;
    Twain.Source[CurrentSource].EnableSource(False, False);
    while Twain.Source[CurrentSource].Enabled do
       Application.ProcessMessages;


Lo que estoy haciendo es llevar la imagen a un Bitmap pero solamente me hace la Opcion Vertical u Horizontal pero nada de rotacion de 90 grados a derecha o izquierda

Código Delphi [-]
procedure TFormMainP.ItemFlipVerticalClick(Sender: TObject);
var
  Image: TBitmap;
begin
  if GetCurrent(Image) then {In case there is an image}
  begin
    Image.Canvas.StretchDraw(Rect(0, Image.Height, Image.Width, 0), Image);
    Self.Image.Picture.Assign(TBitmap(ImageList[CurrentImage]));
  end {if GetCurrent}
end;

{Flip the current image horizontally}
procedure TFormMainP.ItemFlipHorizontalClick(Sender: TObject);
var
  Image: TBitmap;
begin
  if GetCurrent(Image) then {In case there is an image}
  begin
    Image.Canvas.StretchDraw(Rect(Image.Width, 0, 0, Image.Height), Image);
    Self.Image.Picture.Assign(TBitmap(ImageList[CurrentImage]));
  end {if GetCurrent}
end;




Puedo dentro de delphi como opcion hacer rotacion de imagen o puedo agregar mediante un comando la opcion en el Twain al momento del escaneo?.

Gracias.
Responder Con Cita
  #2  
Antiguo 17-07-2015
Avatar de Ñuño Martínez
Ñuño Martínez Ñuño Martínez is offline
Moderador
 
Registrado: jul 2006
Ubicación: Ciudad Catedral, Españistán
Posts: 6.000
Poder: 25
Ñuño Martínez Tiene un aura espectacularÑuño Martínez Tiene un aura espectacular
Hay bibliotecas, como la Vampyre, que permite modificar imágenes casi de cualquier forma imaginable. Aunque como lo que quieres es sencillo, quizá es que hagas tú mismo el giro.
__________________
Proyectos actuales --> Allegro 5 Pascal ¡y Delphi!|MinGRo Game Engine
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Delphi Twain shoulder Varios 5 22-11-2017 14:39:09
TWAIN Delphi 2007 edtruji Internet 4 17-05-2014 11:49:06
Delphi 2010: Problema con los colores al escanear con Delphi TWAIN davidrgh Gráficos 0 23-08-2012 14:00:55
Rotacion de un Form paul170185 Gráficos 2 23-04-2009 01:20:22
delphi twain alt126 C++ Builder 0 04-06-2006 10:35:15


La franja horaria es GMT +2. Ahora son las 16:50:55.


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