Question [Q] Change lockscreen image dinamically

Hi all
I would like ask you if there's a way to dinamically change the image used as background in the lockscreen. I read there's no official way to do this (no Android API) but I've cyanogen mod and I've a good experience in android programming and .apk decompiling.
I suppose android store the image in system folder because when you click on "Edit lockscreen background" in "Settings" system ask you to choose the size of the photo with an orange rectangle... is that correct?

Thanks all guys!