You can find plenty of utilities that can be used to create animated cursors (.ani) from many sources, including bitmap images, such as the JPEG, PNG or TIFF files. For example one of such cursor making utility is called AniTuner and it should allow you to easily transform your .jpg pictures to .ani files, i.e. achieve jpg to ani conversion.
Open JPG file Open ANI fileA 3D CAD translation software