2 Replies Latest reply on Jun 15, 2010 2:14 AM by vineet osho

    how to send byte array of image with 300dpi.

    vineet osho Level 1

      Hello fiends

                         i am making an application in which i have to send the byte array of an image with 300dpi.

      so i am using image snapshot class for that and use that code.


                          var snapshot:ImageSnapshot = ImageSnapshot.captureImage(cnvParent,300);
                          var bdata:String = ImageSnapshot.encodeImageAsBase64(snapshot);


      but when i send that bdata to php end using httpService.The size at other end of image increases surprisingly.i means it will increase its actual height and actual width.so is there any way to overcome this increase in size when i bitmapped image at 300 dpi?

      if there any way then please tell me.waiting for your reply.


      Thanks and Regards
          Vineet Osho

        • 1. Re: how to send byte array of image with 300dpi.
          David_F57 Level 5



          converting a screen dump to dpi isn't that simple, this calculator will give you an idea of how a screen image translates into dpi and its final printable size






          1 person found this helpful
          • 2. Re: how to send byte array of image with 300dpi.
            vineet osho Level 1

            Thanks david for such a quick reply.the link is really helpful.So we have to calculate the screendpi thruogh our code and then set the height and width of image.is there any simple way to sort out my problem.i just want to print my image at 300dpi but i am using image snapshot class so its taking the snap of my container(image) and save the image at 96 dpi which is dpi of my screen(monitor).so is there any way or any class in flex through which i got the image at its original dpi.i am not stick on 300 dpi but i m getting image from backend through xml at 300dpi.thats why i want the byte array i am sending should be at 300dpi.i am totally confused now.so please help me.


            Thanks and regards

              Vineet osho