This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert image to hide it  RSS feed

 
Reyada Wolak
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application and i want to secure my icons and logo from being used by others once the application is distributed. i have seen some applications has their icons as *.class file instead of the real image. how can i do this?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disclaimer: I haven't tried it out myself. Just thinking out loud.

1) Have a class which has a byte array and other instance variables for image attributes you might be interested in.
2) Choose the image you want to display. Extract the bytes and info and wrap them in this class
3) Persist the instance.
4) When you want to display the image, deserialize the object, extract the bytes, re-create the image from the bytes and use it.
 
Reyada Wolak
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another option is to store the image as Bytes in the DB (BLOB) is DB is used.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!