HI all,
I'm in trouble with PSPSX6.
I have an script running fine with my old PSP (X4, X5).
But in X6 the result in not good.
I use the script to insert the date on upper right corner of my pitcures.
This data is found in Exif of the picture.
I use an fucntion returning the date, but with X6 , the result it not correct.
The source code is
--------------------------------------------------------------------------------------------------------
def FormatDate( InputExif, Format ):
''' Use the time.strftime method to format a date string in various ways.
The input exif date is always formatted as yyyy:mm:dd hh:mm:ss, so the first
step is to convert that to a time tuple. We do that by changing the one lone
space to a colon, then using split to give us a tuple that coincidentally
matches the one used by time.
'''
Formatted = InputExif.replace( ' ', ':' )
Date = Formatted.split( ':' )
# use an exception handler to deal with the fact that the date might not be valid
try:
# use mktime to compute the time in seconds from the time tuple.
TimeInSeconds = time.mktime( (int(Date[0]), int(Date[1]), int(Date[2]),
int(Date[3]), int(Date[4]), int(Date[5]), 0, 0, -1 ) )
# now go from time in seconds back to a formatted time. By detouring through a
# conversion to seconds we have acheived the desired side effect of letting Python
# compute the day of the week for us.
FormattedDate = time.strftime( Format, time.localtime(TimeInSeconds) )
except ValueError:
FormattedDate = '**no data**'
return FormattedDate
--------------------------------------------------------------------------------------------------------
Each time X6 return "**no data**".
The full code source are here:
http://www.remdesign.be/pspx6/D70-Date_ ... .PspScript
Thanks for your help.
JP Remacle.
Script working fine with PSPX4, PSPX5. Not with PSPX6
Moderator: Kathy_9
-
Dizzie
- Posts: 73
- Joined: Tue Sep 13, 2011 3:59 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: dunno
- processor: dunno
- ram: 6 GB
- Video Card: dunno
- sound_card: dunno
- Hard_Drive_Capacity: 500
Re: Script working fine with PSPX4, PSPX5. Not with PSPX6
I tried it on X6 64 bit and got the same "nodata" result. I tried it on X6 32 bit and it works but gives the wrong date.
