Script working fine with PSPX4, PSPX5. Not with PSPX6

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
RemDesign
Posts: 1
Joined: Tue Oct 08, 2013 4:14 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Dell Inc
processor: 2.50 gigahertz Intel Core2 Duo
ram: 8go
Video Card: NVIDIA Quadro FX 3600M [Display adapter]
sound_card: SigmaTel High Definition Audio CODEC
Hard_Drive_Capacity: 2000.13 GB

Script working fine with PSPX4, PSPX5. Not with PSPX6

Post by RemDesign »

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.
Attachments
Script running wirh PSP_X5, result is correct
Script running wirh PSP_X5, result is correct
Script running wirh PSP_X6, result is false.
Script running wirh PSP_X6, result is false.
Dizzie
Posts: 73
Joined: Tue Sep 13, 2011 3:59 pm
operating_system: Windows 8
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

Post by Dizzie »

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