Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reducing the size of BMP files
Message
 
À
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:
00549337
Vues:
14
>Select the control in a form and press F1 (or RightClick->Help)

Something must be screwy in my help configuration, I can get no help on the control. Nothign from F1, nothing from picking Help from the right-click menu. Regular VFP help works fine though, I might be missing a piece.
>
>
>
>* 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.)
>
Slight modification and it mostly works. Thanks. That 0 as the third parameter in the SaveAs method has to be 3. With a 0 or 1 it give an "invalid page type" error. With is set to 2, it exhibits the same extremely lossy compression I get by simply resizing the OLE object in Crystal. With it set to 3 it saves a nice sharp but reduced in size image. Only problem - it comes out black and white! The even stranger thing is that on screen it looks fine. I tried playing with the other parameters, but nothing seems to make a difference. The 4th and 5th seem to be compression type and depth.

>
>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.

That would be, how shall I put it, bad < g >. I can probably figure some workaround, but the code that generates the report data and copies the picture file is alreayd called froma button on a form. I'm doing nothing in Crystal except present the data, VFP is doing all the query work.

>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):

Thanks for the help. Every little bit of advice I get gets me that much closer. I find it pretty amazing that CR doesn't support more than BMP images, and then in such a limited fashion. I guess no one writes nifty inventory reports with pictures of the items. Other than that, CR has been a godsend in this application, there is no way I could possibly do the main reports in the native VFP report writer.

Randy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform