How to resize an image on a BlackBerry

434585 pts.
Tags:
BlackBerry
Mobile
Is it possible to resize an image on BlackBerry? Here's our scenario...if I want to create an image of 200x200, could I make it 100x100 on a BlackBerry screen? Would there be a tool or code for this?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here are some CODE I used to resize images:

Imports PQScan.PDFToImage

Namespace SpecifyImageSize
  Class Program
    Private Shared Sub Main(args As String())
      ' Create an instance of PQScan.PDFToImage.PDFDocument object.
      Dim pdfDoc As New PDFDocument()

      ' Load PDF document.
      pdfDoc.LoadPDF("sample.pdf")

      ' Set dpi to render whole image
      pdfDoc.DPI = 96

      ' Save multi-page tiff
      pdfDoc.ToMultiPageTiff("multipage.tiff")
    End Sub
  End Class
End Namespace


I hope it helps. Good luck.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    There is most likely a way to do it by code, but some more details would be necessary, for example, the type of app (Java, Qt, HTML5) and/or the BlackBerry OS version.
    78,735 pointsBadges:
    report
  • evanpan
    Here are some code I used to resize images:
    Imports System.Drawing
    Imports System.Drawing.Imaging
    Imports PQScan.PDFToImage
    
    Namespace SpecifyImageSize
      Class Program
        Private Shared Sub Main(args As String())
          ' Create an instance of PQScan.PDFToImage.PDFDocument object.
          Dim pdfDoc As New PDFDocument()
    
          ' Load PDF document.
          pdfDoc.LoadPDF("sample.pdf")
    
          ' Set dpi to render image
          pdfDoc.DPI = 96
    
          'Get total page count.
          Dim count As Integer = pdfDoc.PageCount
    
          For i As Integer = 0 To count - 1
            'Convert page to image in target size
            Dim bmp As Bitmap = pdfDoc.ToImage(i, 100, 200)
            'Save image 
            bmp.Save("output" & i & ".jpg", ImageFormat.Jpeg)
          Next
        End Sub
      End Class
    End Namespace
    I hope it helps. Good luck.
    65 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: