Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline johnnyontheweb  
#1 Posted : 12 October 2021 19:48:43(UTC)
johnnyontheweb


Rank: Member

Groups: Registered
Joined: 15/10/2013(UTC)
Posts: 16

Was thanked: 3 time(s) in 1 post(s)
Hi all,
I have a lot of old .xmcd files to convert to .sm, but I encounter problems when opening almost all of them, unless I save them in XMCD 12 or 13 and I remove images.
I spent some time to debug the plugin, and I found this:

- images are not always represented as string in base64

- only if format XMCD > 13: there's hell with indeces in function MergeManyArrayPostfix in OpenSaveXMCD.cs - often, index for 'value' array is less than 0.

I have some questions about this plugin:
- is advised version of XMCD 12 or 13?
- if there's limitation on format, can not supported format be blocked?

thanks in advance for such info
Offline Davide Carpi  
#2 Posted : 13 October 2021 14:11:08(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,418
Man
Italy
Location: Italy

Was thanked: 1203 time(s) in 794 post(s)
Hello johnnyontheweb,

That plugin is open to improvements, the main problem is that you should be familiar with both programs to do something.

In general, if there are multiple data types for the same objects would be better to detect the type, then develop alternative functions to read the data, otherwise read a placeholder, nothing, or throw an error. I wouldn't block the entire format just because the indices, better to have something to start from than nothing.



If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline johnnyontheweb  
#3 Posted : 13 October 2021 16:08:07(UTC)
johnnyontheweb


Rank: Member

Groups: Registered
Joined: 15/10/2013(UTC)
Posts: 16

Was thanked: 3 time(s) in 1 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
I wouldn't block the entire format just because the indices, better to have something to start from than nothing


I completely agree on that, the point is nothing except text regions is read in most cases.
A message warning the user to give XMCD <= 13 as input would definitely save a lot of time in trials.

Consider, as a sample, the 2 files attached (they are the same file, with 2 different XMCD formats):

inertias.xmcd (77kb) downloaded 7 time(s).
inertias13.xmcd (61kb) downloaded 6 time(s).
Offline Davide Carpi  
#4 Posted : 14 October 2021 11:58:38(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,418
Man
Italy
Location: Italy

Was thanked: 1203 time(s) in 794 post(s)
Originally Posted by: johnnyontheweb Go to Quoted Post
Consider, as a sample, the 2 files attached (they are the same file, with 2 different XMCD formats):

inertias.xmcd (77kb) downloaded 7 time(s).
inertias13.xmcd (61kb) downloaded 6 time(s).


Thank you very much, this might help a lot! I'll try to improve the plugin as soon as I can.

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline johnnyontheweb  
#5 Posted : 14 October 2021 12:08:49(UTC)
johnnyontheweb


Rank: Member

Groups: Registered
Joined: 15/10/2013(UTC)
Posts: 16

Was thanked: 3 time(s) in 1 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post


Thank you very much, this might help a lot! I'll try to improve the plugin as soon as I can.



You're welcome - please keep in mind that inertias is in format XMCD>13, the other in XMCD = 13.
And please do not comment calculations on principal axes because they're not always right Biggrin
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.