If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > BLOB image extraction

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #16 (permalink)  
Old 02-23-06, 18:03
campc123 campc123 is offline
Registered User
 
Join Date: Feb 2006
Posts: 10
yeah i found that just before you posted. it works great. I feel like I owe you a big one dude. Thanks for the tremendous advise
Reply With Quote
  #17 (permalink)  
Old 09-03-09, 16:16
keoladonaghy keoladonaghy is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
extracting graphics

Aloha, I am attempting to extract graphics as described and discussed above for a friend with a database in Paradox 5. The examples above helped me tremendously and I'm making some progress but it doesn't seem to be working completely.

The table I have contains 4596 elements. The column with the graphics is a BLOB, and not every recorded contains an element.

When I run a script like the final one shown here (modified of course to my database), it extracts exactly 37 files and then stops. It is not the first 37 records, either. None of them has a graphic in the BLOB column, so I get 37 files of 0k.

I've used tc.home() to make sure TCursor is set to the first record. I've repaired the table and also have tried this on a different machine, same exact results. I've also used .isBlank() to have the script bypass empty records, but then I get no files exported.

Can anyone tell me what may be causing this script to export only those 37 records?

Code:
var
  grImage  Graphic
  grObjName	String
  tcHandle  TCursor
endVar

tcHandle.open(":ProjectsDir:Objects.db")
tcHandle.home()  ; maybe not necessary but couldn't hurt

scan tcHandle :
	if NOT grImage.isblank() then	
     	grImage = tcHandle.Photograph
	grObjName = tcHandle.ID
     	grImage.writeToFile(":ExtractedImages:" + grObjName + ".bmp")
	endIf

endScan
tcHandle.close()
Mahalo (thanks) in advance.
Reply With Quote
  #18 (permalink)  
Old 09-04-09, 08:02
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
in the scan, you don't want to know if the image var is blank, you want to know if the blob field is blank.. you've got it backwards.. should be:

if NOT tcHandle.Photograph.isblank() then
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
  #19 (permalink)  
Old 09-04-09, 16:01
keoladonaghy keoladonaghy is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
Thanks for this, Steve. Unfortunately it didn't fix the issue. Paradox runs a little longer, but still does not output any files. If I eliminate the if not statement, it still exports those 37 0k files which are empty, and then nothing.

I'm really curious as to why it is exporting those records. Based on the ID numbers given by the person who created the database they are all part of a similar group, perhaps all entered at the same time. The record immediately after this group does have a graphic in the BLOB field, perhaps Paradox is choking on that.

Thanks again, if you have any other thoughts of how to troubleshoot or fix this I'd be grateful.
Reply With Quote
  #20 (permalink)  
Old 09-04-09, 16:11
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
have you attempted to view the contents of the blob fields and/or an old backup with the same contents?

you previously mentioned that you ran the repair tool on the table.. the repair tool does not touch the blob fields.. if they are damaged and/or not what you think they are, you have to determine that in a manner such as your current scan..

my guess is that the blob fields *are* damaged and/or not what you think they are.. the scan is doing what you told it to do.. unfortunately, you're on your own from that point..
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
  #21 (permalink)  
Old 09-08-09, 17:52
keoladonaghy keoladonaghy is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
Aloha and many thanks again, Steven. The BLOB field does contain graphics, and I have been able to view the ones I've looked at, so perhaps one/some of them are damaged and the script simply choking at that point.

I didn't realize the repair wouldn't work on the BLOBs. Good to know. I'll do a few more checks before giving up on this one. I appreciate your suggestions.

Keola
Reply With Quote
  #22 (permalink)  
Old 12-01-11, 14:56
sdc sdc is offline
Registered User
 
Join Date: Dec 2011
Posts: 1
Non-programmatic Solution to BLOB image extraction

I had this same problem stated in the original post, and found a totally different solution to extracting large numbers of images (from lots of records) from a Paradox .mb file.

a) Open the table in Paradox.
b) Open a quick report.
c) Print to PDF (free utilities are available online for this)
d) Using a Mac, download File Juicer. (not available for PC apparently)
e) Run the printed PDF through File Juicer.

All images will be extracted from the PDF into individual .jpg files.
Reply With Quote
  #23 (permalink)  
Old 12-01-11, 16:57
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
sdc.. obviously, this has limited functionality to most folks, but VERY cool idea!
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On