BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 02-26-2009, 10:49 PM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: 8300C
PIN: N/A
Carrier: Dialog
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I reduce Image size to send an email attachment

Please Login to Remove!

Hi,
I have to send an email image attachment to the server. However it takes lot of time to send the mail. Therefore, I have to reduce the image size before attaching it. I am thinking on following options. Could you please tell me out of those options which is more feasible.


Option1: Before I take the photo I check the camera resolution. If it is high reduce the resolution by code. Is it possible to change the camera resolution by code? If so what are the packages that I can use?

Option2: I know how to setScale using EncodedImage Class. Also, I know how to take it to a BitMapField. I will try to attach the BitMapField image to the mail. Will it be possible? Is it possible to send the .bmp image as an attachment.

Option3: After I setScale I tried to get the byte Array as follows,

EncodedImage ei = ncodedImage. getEncodedImageResource ("file://"+imagePath);
ei.setScale(2);

mp.addBodyPart(new SupportedAttachmentPart(mp,"image/jpg",imageName+".jpg",ei.getData()));
But there were no effect.
Something wrong with my code?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Siemens 6ES7952-1AM00-0AA0 6ES7 952-1AM00-0AA0 SIMATIC S7 MC952 Memory Card 4MB
$399.0
Siemens 6ES7952-1AM00-0AA0 6ES7 952-1AM00-0AA0 SIMATIC S7 MC952 Memory Card 4MB pictureTeac 15553160-00, 13353160-00A Memory Board T43481
$60.0
Teac 15553160-00, 13353160-00A Memory Board T43481 pictureSiemens New 6ES7 954-8LL02-0AA0 6ES7954-8LL02-0AA0 Memory Card 256M
$585.0
Siemens New 6ES7 954-8LL02-0AA0 6ES7954-8LL02-0AA0 Memory Card 256M pictureNew in box Siemens 6ES7 954-8LL02-0AA0 Memory Card One year warranty
$580.0
New in box Siemens 6ES7 954-8LL02-0AA0 Memory Card One year warranty pictureM&A Technology Personal Computer Laptop E09E16 w/30gb hdd +1gb memory Windows XP
$53.99
M&A Technology Personal Computer Laptop E09E16 w/30gb hdd +1gb memory Windows XP picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.