Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reducing the size of BMP files
Message
De
26/08/2001 06:28:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00549089
Message ID:
00549227
Vues:
27
>Where can I find documentation on the PEMs of this control?

Select the control in a form and press F1 (or RightClick->Help)

> I've been looking at it and can't make much sense by the names of things how to begin going about loading an image and then saving it as a smaller version.
* please check carefully, this is what I recall from my own exploration
* of the control: as I said, I don't use it because I have to produce
* JPEG thumbnails
oleImage.Image = "filename" && loads image
oleImage.Zoom = percent && you'll have to calculate this
oleImage.SaveAs("thumbnail",3,0,1,0,.T.)
> Also, any idea if this can be instatiated as a non-visual class? I REALLY don't need to have an extra oddball form popping up to the users, even if all it says is "Please Wait" or something.

I believe you can't (but you should investigate further). If you were working with Fox Reports, you could put the control in an underlying form and process each image through a form method accessible from the report code. As I don't have experience with Crystal Reports I can't say this could be helpful.

> You ARE referring to the "Kodak Image Edit Control", right? I have to worry about version compatibility as well, I believe that this control has changed slightly from Windows version to version. I'm using Win2K, the client has Win95 on all their PC's.

Yes, I think you'll have to cope with this issue. Don't know if this will help, but this code can check what version is present (please bear in mind I don't have the meanings to test this completely):
lcOnError = ON("ERROR")
llOps = .F.
ON ERROR llOps = .T.

STORE .F. TO llOldVersion, llNewVersion

loImage = CREATEOBJECT("WangImage.Application")
IF llOps
   llOps = .F.
   loImage = CREATEOBJECT("Imaging.Application")
   IF !llOps
      llNewVersion = .T.
      RELEASE loImage
   ENDIF
ELSE
   llOldVersion = .T.
   RELEASE loImage
ENDIF

ON ERROR &lcOnError

IF llOldVersion
   WAIT WINDOW "old version present"
ELSE
   IF llNewVersion
      WAIT WINDOW "new version present"
   ELSE
      WAIT WINDOW "no image control!!"
   ENDIF
ENDIF
>>The Image Edit Control in any flavour of modern Windows will do the trick of resizing bmps (lucky you!, it doesn't save to jpeg files - that was *my* need...).
>>
>>>[...]Crystal does not seem to resize BMP files properly. Reducing should not cause loss of image quality - I can reduce BMP files on a web page, or in Paint Shop Pro, with
>>>no quality loss. So, does anyone know how to ix this in Crystal, or does anyone know of another graphics library that I can add to my VFP app that can handle a resize function? This is becoming a major headache for me. HELP!

bye
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform