Posts

Showing posts with the label #photoEthereum

Blockchain Identity Example "Passport Contract" Version 2

So in this example, on top of just information, i want to be saving the Users Picture just like the passport. I should be able to retrieve this picture and be able to view it. Given that there is no specific Datatype for image. i Will be using a "Base64" string of the image. In order to see an example of this Image to String of Base64: Use this https://www.base64-image.de  Following is some Sample Outputs and images size Filesize: 8.21 KB Encoded: 10.95 KB Width: 170 px Height: 86 px Filesize: 53.60 KB Encoded: 71.47 KB Width: 511 px Height: 511 px From the samples. The bigger the image, the more KB of size, and more Ether needs to be spent. Assuming i stick to a 72x72 image Filesize: 6.68 KB Encoded: 8.91 KB Width: 72 px Height: 72 px which works fine to be saved in the block-chain for the period of the passport Validity. The new code is added in Bold pragma solidity ^0.4.0; contract passportAresh{ //Declare a struct similar to C++ ...