Question Linking Jpeg Images to access: Selecting 2 from multiple images stored on network

Chris,

With the scanning software that I am currently using Scan All 21, I have the following options:
- I can select a prefix for all cards
- I can select and suffix
- I can use a counter

I was using a prefix (different text) and the counter.

So yes, the answer to your above question is yes!

Stacey
 
Stacey.

Good, so a few more questions.
You mention the IRS so does that mean you’re in the USA?
I don’t need an exact location but it would be handy to know your time zone for posting purposes.

Will 4 digits be enough in one directory, 1 to 9999 maximum?

You have probably noticed a flash when loading JPG’s.
Do you want to change the files to BMP’s because they probably won’t flash?

How big are the JPG’s and if you save the images as BMP’s how big are they?
This last question is more about making off site backups but I think it will need to be done because you are running a business and don’t want to loose all that data and work.

Regards,
Chris.
 
The path is a system variable in this case GetImageDir which is stored on the Main Menu

FullPath = GetImageDir & .[Image File]

Code:
Function GetImageDir() As String
    GetImageDir = Forms![Menu]![Image Directory]
End Function

Sofaras the image coding is concerned, I still believe that naming images to the Inventory record and appending 1-5 is a better system, all the inventory system needs to know is how many images for each item.

Simon
 
Stacey.

Good, so a few more questions.
1. You mention the IRS so does that mean you’re in the USA?
I don’t need an exact location but it would be handy to know your time zone for posting purposes.

2. Will 4 digits be enough in one directory, 1 to 9999 maximum?

3. You have probably noticed a flash when loading JPG’s.
Do you want to change the files to BMP’s because they probably won’t flash?

4. How big are the JPG’s and if you save the images as BMP’s how big are they?

This last question is more about making off site backups but I think it will need to be done because you are running a business and don’t want to loose all that data and work.

Regards,
Chris.


1. Yes I am in good old sunny Florida - although we have been in the 30's at night lately. Right now it is around 5:30 pm.

2. Yes I think that 4 digits will be enough. Most things that I have scanned so far have been in groups of 700-800-ish.

3. As far as the images, I would have to play around with the scanner some this weekend. I think we ended up with the jpeg because of the scanning time. We can scan to other formats. I'll get back to you this weekend on that.

4. Backup storage of data: I've already discussed that with some friends locally. Right now I have a 7.5T array (5 x 1.5 T hard drives) that the images will be scanned to. The plans are to eventually have this array in a safe deposit box in mid-state Florida (away from the coast for possible hurricane damage) as a backup storage with the images also stored in a working (yet to be purchased) storage array here at my home.

Thanks!

Stacey
 
Stacey.

OK, backups taken care of. If the ‘flash’ is of no concern then go for scanning speed because it would be time wasted doing otherwise.

Regards,
Chris.
 
Simon.

>>Sofaras the image coding is concerned, I still believe that naming images to the Inventory record and appending 1-5 is a better system, all the inventory system needs to know is how many images for each item.<<

How would it be a better system, better than what?
 
Your image directly relates to your Inventory. There is no confusion even with have multiple images for each inventory item. We have images that are Masters and then low res images are all tied into Stock. Everyone knows that that image relates to a specific Inventory item. DSC00001 means nothing, the images relate to art and some of these works of art start off as Untitled and then named or even reworked, some have poor images that need to be re-done so it is important that your can go directly to the image directory and identify and replace images with the certainty that you are affecting the right image.

Simon
 
Simon.

Are you replying to me?

If so then your statement of >>Your image directly relates to your Inventory. There is no confusion even with have multiple images for each inventory item.<< is correct.

The rest of your statement does not seem to apply to what we are doing here and is perhaps just your business rule.

If you have read this thread in its entirety then how would you store Stacey’s scanned images? Meaning, what table structure would you use?
 
I would store the image as:

1_1.jpg
1_2.jpg
1_3.jpg
1_4.jpg
1_5.jpg etc

With prefix:

Physical directory = "C\Images\"
ImagePath = physical directory & "prefix"
ImageFile1 = ImagePath + InventoryID + "_1.jpg"
ImageFile2 = ImagePath + InventoryID + "_2.jpg"
ImageFile3 = ImagePath + InventoryID + "_3.jpg"
ImageFile4 = ImagePath + InventoryID + "_4.jpg"
ImageFile5 = ImagePath + InventoryID + "_5.jpg"

On the table Inventory all it needs to store are how many images or a separate flag for each image:

Code:
Function SetImage()
Dim FullPath1 As String
        
    With CodeContextObject
        FullPath1 = GetImageDir & .[ImageFile1]
              
        If Dir([FullPath1]) = Empty And .[ImageFlag1] = -1 Then
            .[ImageFlag1] = 0
        ElseIf Dir([FullPath1]) <> Empty Then
            If .[ImageFlag1] = 0 Then
               .[ImageFlag1] = -1
        End If
    End With
End Function

Or you could loop through the files in a GetImage statement.

Simon
 
Simon.

Your code doesn’t even compile, it’s missing an End If, how is that better?
 
Sorry it is just a snippet as I do image interrogation relating to the images aspect and file size. (Using an ActiveX control since Access 97)

Code:
Function SetImage()
Dim FullPath1 As String
        
    With CodeContextObject
            FullPath1 = GetImageDir & .[ImageFile1]
        If Dir([FullPath1]) = Empty And .[ImageFlag1] = -1 Then
            .[ImageFlag1] = 0
        ElseIf Dir([FullPath1]) <> Empty Then
            If .[ImageFlag1] = 0 Then
                .[ImageFlag1] = -1
            End If
        End If
    End With
End Function

Simon
 
Simon.

I’m doing this for Stacey and nobody else. If you would care to the read the entire thread and look at the uploads then you are welcome.
 
Simon,

I am going to sit this weekend and plug what you have done so far into my existing access file and see how it works with everything.

Happy Weekend! (finally)

Stacey
 
Its always nice to see aussies and kiwis getting along
 
Simon.

I’m doing this for Stacey and nobody else. If you would care to the read the entire thread and look at the uploads then you are welcome.

Has anyone else tried the code Chris is working on for Steacy?
I get sporadic errors on versions 5 and 6 and 7 saying "No Folder Selected".
It doesn't happen all the time, but it does happen often.

Has anyone else had this issue? Steacy, Chris this has never happened in your testing?
 
I will have a look at it over the weekend, I'm just finishing off a web site so I can't dilly-dally. I've got the file and will play around with it.

Simon
 
I have come across the error. But the only times that i come across the error are when I do not follow the instructions given exactly :). The instructions that I am referring to are those listed under the blue text "For New Inventory Entry". For example if I enter in the inventory title THEN press new inventory then try to select folder.

I did not mention it because, gasp, I assumed that it was a user error (mine) for not following the directions.

Stacey
 
Stacey and Jdraw.

---------------------
If Len(vntFolder) And Len(vntTitle) Then

vntFolder: -
Len(“C:\Documents and Settings\ChrisO\My Documents\My Pictures\JennyPics\”) = 68
In binary 68 = 0100 0100

vntTitle
Len(“AA Pictures”) = 11
In binary 11 = 0000 1011

0100 0100
And
0000 1011
= 0
0 = False


Fixed: -
If Len(vntFolder) > 0 And Len(vntTitle) > 0 Then

Fixed: -
MsgBox "No Title or Folder Selected.", vbCritical


Version 8 attached.
---------------------


Simon.
---------------------
The reason for not having sequentially constructed file numbers is as follows: -
Code:
One Side Table: - 
InventoryPK | AA Pictures | C:\Documents and Settings\ChrisO\My Documents\My Pictures\JennyPics\ | FilePrefix(if any) | .JPG


Many Side Table: -				Face side		Back side 
InventoryFK | InventoryNum | 1    < FilePrefix(if any)0001.JPG	  and	FilePrefix(if any)0002.JPG
			   | 2    <				  and	FilePrefix(if any)0004.JPG
			   | 5    < FilePrefix(if any)0009.JPG    and	FilePrefix(if any)0010.JPG
			   | 251  < FilePrefix(if any)0501.JPG	  and 	FilePrefix(if any)0502.JPG	
			   | 252  < 				  and 	FilePrefix(if any)0504.JPG

One Inventory Number = 2 images, odd numbers being the face side and even numbers being the back side.

The file numbers will be sequential but they may not be contiguous. The scanner may jam or Stacey may want to partially fill a directory and come back later and add more files starting at a different sequence number.

So as I have said before; this is a special for Stacey who needs to load the images and be able to display them, all 1 million of them, in batches of around a 1000 per directory.
---------------------


As I have said before; because of the 1,000,000 images involved and the fact that the images will be consistent, this one is a special for Stacey. I can not, at this stage, comply with the wishes of all who may want this or may want that or may prefer it done their way. If I take on that challenge I would need to know all digital camera and scanner formats, contend with people mixing formats in the same directory and having image extensions changed from say .JPG to .BMP without changing the file content. Other people would want the images to hyperlink to a graphic package so they can change them. Other people would want blah, blah, blah.

So if I don’t restrict myself to the special needs of Stacey the job simply won’t get done.
 
Last edited:
Stacey and Jdraw.


The file numbers will be sequential but they may not be contiguous. The scanner may jam or Stacey may want to partially fill a directory and come back later and add more files starting at a different sequence number.

There may be batches where the cards are scanned in backwards, resulting in odd # being back and even # being back side of card

As I understand it, right now it is specific to the cards being scanned in odd = front and even = back side
0001.jgeg front of card
0002.jpeg back of card

There may be batches where the cards are scanned in backwards, resulting in odd # being back and even # being back side of card.
0001.jpeg back of card
0002.jpeg back of card

Would it be possible to simply have a control in the form to switch the images so that they would appear as intended, front side first and back side second? Does that make sense?

Not at home computer now to test latest version, I will test as soon as I can.

Many thanks again!

Stacey
 
G’day Stacey.

Yes it would be quite easy to do that at the directory and/or at the inventory level.

I will need to create a check box for each directory record and another for each inventory level. However, if a directory is re-scanned you may have to go back to the inventory items and re-check the check box to flip the images.

Going over to a friends place right now so I don’t know when version 9 will be done. I might have to do that tomorrow when I get home and I won’t get emails while I’m away.

Regards,
Chris.
 

Users who are viewing this thread

Back
Top Bottom