Hi All, I am programatically running VFP job tickets and packing list that have image thumbnails on them generated from larger jpg files. I have literally used "CreateThumbNail()" in Rick's wwAPI class to create the smaller images. However, randomly I get the error "Picture to big, corrupt, or in the wrong format" error. Rerunning the same process against the same files always runs successfully. Has anyone else had this issue and what did you do to resolve? It stops production processes. Thanks much, Craig
Hi Craig.
Rick's tools are top notch - but for image processing, I use IrfanView - automating it from VFP using the RUN command. It's been a very successful approach. http://www.irfanview.com/
Thanks Michael, I don't think it's the image or image creation utility. In fact, I automated CorelDRAW to generate the same thumbnails and still get the same error (randomly). I am even flushing memory after each line item. It seems like a bug in the VFP report writer.
I would actually like to convert this to .net but don't want to spend $500+ for a simple report writer. Any suggestions on an inexpensive .net report writer appreciated too!
Thanks, Craig
Could your issue be concurrency? Are you making sure you're not overwriting the same files from multiple instances of your application?
+++ Rick ---
Hi Rick, So I started digging deeper into the code to check for concurrency issues and realized the variable in the report was getting reset to the large format file... (thread of shame)... Thanks much, Craig
What's a Large Format File in this context and why would that matter?
The main issue I'm referring to is that you might be writing out to the same file, at the same time and that will cause problems. Make sure images written always use unique names that you can clean up later because either multiple users or even the same user may trigger multiple requests to the same operation on a different thread.
+++ Rick ---
I was accidentally referencing original high resolution files (1-2mb) into the report instead of the thumbnail (3-5kb). There are sometimes 10-20 lineitems. Randomly, memory filled up (I presume) and as the error displayed "Picture too big...". I have also cleaned up the thumbnail routine to create unique names. Problem solved, we haven't had any more errors.