Migrate EPiFocalPoint data to ImagePointEditor

Vote:
 

Working with an upgrade of a project that used https://github.com/defsteph/EPiFocalPoint in CMS 11.

Looks like https://github.com/ErikHen/ImagePointEditor is a good option to replace the above now archived project with.

Old data is stored in LongString-column as a simple JSON with X/Y properties while ImagePointEditor has an even simpler delimeted format.

Thinking I will copy the old base class in to CMS 12 project's solution and hide the properties. Then have scheduled job that iterates all old files and saves data in to the new ImagePointEditor property.

Has someone maybe already made this conversion?

#338981
May 30, 2025 7:57
Vote:
 

We did something like that, worked great. 

Didn't move the base class or anything but instead used the old focalpoint property as a string if I recall things correctly. Then we could figure out how to convert the old format to the new

e.g.

if (!url.Contains("focalpoint"))
	return false;

var focalPointString = url.Split('/')[3];
length = focalPointString.Length + 1;
focalPoint = focalPointString.Split('=')[1].Replace('|', ',');
#339147
Jun 02, 2025 8:40
Johan Kronberg - Jun 02, 2025 14:06
Thanks! I already finished something that appears to be working nicely too. Will put it in a blog post!
Vote:
 
#339178
Jun 02, 2025 21:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.