Here my code is in InDesign Based. I don't know we are getting the Image size directly.?
Throught InDesign [you using the InDesign Script then] Script here I pasted the below coding...
//============================= Getting the Image Height / Width ============================//
var myDoc = app.activeDocument;
myPicFile = File("E:\\HariharaSudhan\\Blue hills.jpg");
//======================== Then u please select the Image File in InDesign and then you run the script ===============//
var mySel = app.selection;
var Bound = mySel.geometricBounds;
var height = Bound - Bound;
var width = Bound - Bound;
alert("Image Height :"+ height +" "+"Image Width :"+ width );
//============================= End : Getting the Image Height / Width ============================//
Please let me know if you have any queries.
Thanks & Regards
1 person found this helpful
You are mixing things up.
If you have an image or graphic that is placed in Indesign you should use myPicFile.geometricBounds // myPicFile must be a valid graphic or image item.
Thanks T.R.Harihara SudhaN & Thomas B. Nielsen i learned.
a r u l