We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Resize of images

Hi,

Is there any option for resizing the existing image and then save it on the disk?

Kindly suggest and i am unable to find a suitable API.

Thanks & Regards,

Chaitra

Hi Chaitra,


Thank you for contacting Aspose support.

The Image class provides resize method that you may use as per your requirement. Please check the below provided simplest code snippet, and give it a try with the latest version of Aspose.Imaging for Java 2.1.0 on your end.

Java

//Load image to be re-sized
Image image = Image.load(myDir + “sample.jpg”);
//Re-size image
image.resize(200, 200);
//Save the result to disc
image.save(myDir + “resized.jpg”);

Please feel free to write back in case you face any difficulty.

Hi,

Thank you for the response.

As suggested i used the above piece of code to resize the images but i am facing issues.

Though i have the licensed version of Aspose in the resized images there is text saying evaluation only.

PFA a sample image

Can you please tell me what is the issue and how it can be resolved?

Thanks & Regards,

Chaitra

Hi Chaitra,


Thank you for the confirmation on previously reported problem.

Regarding the evaluation watermarks on your generated images, could you please confirm that you are setting the license before invoking any of the Aspose.Imaging’s objects? Please note, you have set the license using the License.setLicense method as demonstrated below.

Java

String licPath = “D:/temp/Aspose.Imaging.lic”;
License license = new License();
license.setLicense(licPath);

In case the problem persists, or you are already setting the license in your application then please check the following,

  • If you are using multiple Aspose APIs in your application, you need to set the license for each API separately using the corresponding License class.
  • Check the validity of your license key by opening the .lic file in a notepad, and look for the SubscriptionExpiry tag.

If you are setting the license properly and license hasn't expired, please share your license file with us using the instructions provided on below link (please do not attach the license to the forum thread).
http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx

Hi Babar,

Thank you for your response.

After setting the license path as indicated i am getting an error message.

The error message in the log file is

com.aspose.imaging.PleaseReportException: The subscription included in this license allows free upgrades until 19 Feb 2014, but this version of the product was released on 10 Mar 2014. Please renew the subscription or use a previous version of the product.

Can you please tell me what is the procedure for subcription reneval or how do we include imaging API in our license?

Thanks & Regards,

Chaitra Dixit

Hi Chaitra,


It seems that your subscription expired before the release of Aspose.Imaging for Java 2.1.0, therefore you have to renew your subscription in order to use the component in licensed mode. We would request you to please create a thread in Aspose.Purchase forum for your inquiries related to the subscription renewal. Members from the sales department will pickup your inquiry there, and will guide you accordingly.

Hi Babar,

Okay. i will check with the sales department.

Thanks & Regards,

Chaitra