×

Discussion Board

Results 1 to 5 of 5

Thread: MIME Type

  1. #1
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    78

    MIME Type

    i just learn about MMS with MMSMIDlet on forum.nokia.com

    but i read that MIME Type for image just image/jpg, image.gif

    how with image/png, i am use n73, how to send PNG Image, n how to get Byte[] from PNG image, i read manual Image but not found function return Byte[]

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: MIME Type

    hi saifulhq,

    encoding are set explicitely by you when calling getSnapshot(...)
    Code:
    byte[] pngImageData = videoControl.getSnapshot(null);
    (note quite sure which is default on N73: png or jpeg encoding when passing null - mipd implies png though)
    Code:
    byte[] pngImageData = videoControl.getSnapshot("encoding=png")
    use property:
    Code:
    video.snapshot.encodings
    to get list of encoding supported on given device but N73 being 3rdEd FP1 device should support png/jpeg/gif/bmp if I'm not wrong:
    check also this feature matrix support:
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

    hth,
    regards,
    Peter

  3. #3
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: MIME Type

    hi saifulhq,

    i've just read in FN doc:
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html
    The parameter for getSnapshot is a String stating which format the data should be in; if it is null, then the data will be in PNG format, which is guaranteed to be supported by all implementations.
    so PNG is default format,

    hth,
    regards,
    Peter

  4. #4
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    78

    Re: MIME Type

    i am use s60 and nokia prototype 4

    i want to send MMS with png file, ia have file png called picture.png at folder res, i get the pixel from the picture with getRGB. then i rotate the picture 180 degrees.

    so, can i send the new picture with MMS, because i read at manul png image have not return byte[].

    if i send MMS, i am send byte[] can with inputStream. can i input my new picture to inputStream.

    try {
    image = Image.createImage(fileName);
    rgb = new int [image.getWidth() * image.getHeight()];
    baruRGB = new int[image.getWidth() * image.getHeight()];
    image.getRGB(rgb, 0, image.getWidth(), 0, 0, image.getWidth(), image.getHeight());
    }catch(IOException e){
    System.err.println(e);
    }

    for(int i=0 ; i<image.getWidth()*image.getHeight() ; i++){
    baruRGB[image.getWidth()*image.getHeight()-i-1] = rgb[i];
    }

    baruImage = Image.createRGBImage(baruRGB, image.getWidth(), image.getHeight(), false);

    can i send baruImage via MMS

  5. #5
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: MIME Type

    hi saifulhq,

    if you are sending mms to another midlet (not into client inbox) then you don't need to create correctly png-encoded byte data, its only needed if you sending mms to inbox,
    http://discussion.forum.nokia.com/fo...ad.php?t=71030
    http://discussion.forum.nokia.com/fo...ad.php?t=88540
    I've found Java 1.1 compatible png encoder:
    http://javaboutique.internet.com/PNG_Encoder/
    maybe you can use it directly (not sure though) or use as guide for creating your own encoder,

    hth,
    regards,
    Peter

Similar Threads

  1. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41
  2. Extending the MMS capabilities to another MIME type
    By curcio1 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-12-21, 05:32
  3. Custom MIME Type
    By arizkohli in forum Symbian
    Replies: 0
    Last Post: 2005-05-28, 12:54
  4. D211 with RH7.3
    By fiveam in forum Multimodecards
    Replies: 3
    Last Post: 2003-02-24, 09:06
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×