For creating Facebook App, we need Icons and banners for the app with defined sizes. At the time of development ,we don't concentrate on Icons and Banners design. At the starting stage we need rough Icons and Banners. If you are a java developer you can create these Icons and Banners in a minute. You can find the basic Idea of this app at http://blog.sodhanalibrary.com/2014/09/create-phonegapcordova-icons-and.html

Java Library :

For quality image scaling, I have used java-image-scaling library.

Java Program to create icons :

Replace destinationDir with your own destination directory Path
Replace appIcon with your own app icon Path
Add dimension of the Icon you want to dimensions
Run this program
Find destination path for new Icons
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import com.mortennobel.imagescaling.ResampleOp;

public class CreateFbAppIcons {
  static String destinationDir = "C:\\fbIcons";
  static String appIcon = "C:\\icon.png";
  static ArrayList<Dimension> dimensions = new ArrayList<Dimension>();
  
  public static void main(String[] args) throws IOException {
      dimensions.add(new Dimension(1024,1024));
      dimensions.add(new Dimension(16,16));
      readFile(destinationDir);
  }
  
    public static void readFile(String path) throws IOException {
        File destDir = new File(destinationDir);
        if(!destDir.exists()) {
            destDir.mkdirs();
        }
        BufferedImage appIconImg = ImageIO.read(new File(appIcon));
        for(Dimension dim : dimensions) {
            String destFilePath = destinationDir+"\\icon"+(int)dim.getWidth()+"X"+(int)dim.getHeight()+".png";
            File destFile = new File(destFilePath);
            if(!destFile.exists()) {
                  destFile.createNewFile();
            }
            System.out.println("File "+ destFile.getAbsolutePath());
            ResampleOp resampleOp = new ResampleOp((int)dim.getWidth(),(int)dim.getHeight());
            BufferedImage generatedIcon = resampleOp.filter(appIconImg, null);
            ImageIO.write(generatedIcon, "png", destFile);  
        }
    } 
  
}

Java Program to Create Banners :

Run this program
Find destination path for new Banners
If you want any banner with specific size then you can add those dimension to dimensions
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import com.mortennobel.imagescaling.ResampleOp;

public class CreateFbBanners {
  static String destinationDir = "C:\\fbIcons";
  static String appIcon = "C:\\icon.png";
  static ArrayList<Dimension> dimensions = new ArrayList<Dimension>();
  
  public static void main(String[] args) throws IOException {
      dimensions.add(new Dimension(800,150));
      dimensions.add(new Dimension(1200,627));
      dimensions.add(new Dimension(1848,682));
      dimensions.add(new Dimension(155,100));
      readFile(destinationDir);
  }
  
    public static void readFile(String path) throws IOException {
        File dir = new File(destinationDir);
        if(!dir.exists()) {
            dir.mkdirs();
        }
        BufferedImage appIconImg = ImageIO.read(new File(appIcon));
        for(Dimension dim : dimensions) {
            String destFilePath = destinationDir+"\\icon"+(int)dim.getWidth()+"X"+(int)dim.getHeight()+".png";
            File destFile = new File(destFilePath);
            if(!destFile.exists()) {
                  destFile.createNewFile();
            }
            System.out.println("File "+ destFile.getAbsolutePath());
            ImageIO.write(createScreenImage(appIconImg,(int)dim.getWidth(),(int)dim.getHeight()), "png", destFile); 
        }
    } 
    
      private static BufferedImage createScreenImage(BufferedImage appIconImg, int width, int height) throws IOException {
          int type = appIconImg.getType() == 0? BufferedImage.TYPE_INT_ARGB : appIconImg.getType();
          BufferedImage newPGScreen = new BufferedImage(width, height, type);
          Graphics2D g = newPGScreen.createGraphics();
          g.setColor(new Color(255,255,255));
          g.fillRect(0, 0, width, height);
          double minSize = 0, tw = (double)width, th = (double)height;
          if(tw < th) {
              minSize = tw;
          } else {
              minSize = th;
          }
          minSize = minSize / 4;
          ResampleOp  resampleOp = new ResampleOp((int)(minSize*2), (int)(minSize*2));
          BufferedImage resizedIcon = resampleOp.filter(appIconImg, null);
          g.drawImage(resizedIcon, (int)((tw/2) - minSize), (int)((th/2) - minSize) , null);
          g.dispose();
          return newPGScreen;
      }

}

28 comments:




  1. Wonderful information! I found amazing information on the blogs i suggest everyone to follow the links below to get download files from this website.

    gbwhatsapp apk
    acmarket apk
    freedom apk
    live nettv apk
    aptoide apk

    ReplyDelete
  2. Thanks for the detailed information about this. I would love to see more such awesome blog posts from you. Keep up the Good Work! Thats why I love Gbwhatsapp, It has a lot of awesome features.

    ReplyDelete
  3. Oh boy these banners and icons are just OP. Thank alot for sharing this. Also check out Nulled WP Plugins 2021, clash of clans MOD APK 2021, and MODSDROID

    ReplyDelete
  4. Good blog. Keep sharing. I love them Are you also searching for Cheap Essay24/7? we are the best solution for you. We are best known for delivering cheap essays to students without having to break the bank

    ReplyDelete


  5. I hope this post is beneficial for viewers. Many thanks for the shared this informative and interesting post with us.
    plagiarism-checker-x

    ReplyDelete
  6. That's an outstanding piece of work!I look forward to seeing more!I am very impressed form it.
    avira phantom vpn crack


    ReplyDelete

  7. hello sir,Really amazing work keep doing and keep spreading the information , like your post .remove logo now 2.0 crack

    ReplyDelete
  8. I am very impressed with your post because this post is very beneficial for me and provide a new knowledge… clean my mac high sierra crack

    ReplyDelete
  9. duplicate cleaner 4 license key amazed at how much the Cleaner Pro License key can
    ignore you in a file of unnecessary or forged documents.

    ReplyDelete
  10. Thanks for Sharing such an amazing article. Keep working... Your Site is very nice, and it's very helping us.. this post is unique and interesting, thank you for sharing this awesome information Abbyy Finereader Crack

    ReplyDelete
  11. I am very lucky to have been able to visit your blog and learn about such an intriguing topic
    topic
    So I will bookmark this page so that I can come back to it in the future.
    FullKeygens

    ReplyDelete
  12. Your post is based on the informative things. This is very informative for me and i think, your post is also informative for the world. Keep on hardworking if you want to progress in the future. Thanks again for the great post.
    freekeyspro

    ReplyDelete
  13. An informative and knowledgeable site.
    I really appreciate the article you shared with us.
    artensoft photo collage maker

    ReplyDelete
  14. Wonderful work! This is the kind of info that are meant to be shared across the internet. Disgrace on the search engines for not positioning this post higher! Come on over and consult with my website. avg antivirus activation code

    ReplyDelete
  15. Such a great information for blogger i am a professional blogger thanks softwareeagle.com

    ReplyDelete
  16. Hello, Dear Thanks for sharing such great content with the US it’s really amazing content so please keep sharing. I also have something for you so please check out
    Luminar Neo Ios Torrent Mac
    Luminar AI Ios Mac Torrent

    ReplyDelete
  17. In the game, players participate in illegal street races that focus on different racing styles, using a variety of real-world licensed cars (available at the time of game development and launch) that can be updated and customized with new pieces. while facing the involvement of the police in their efforts to prevent the player. Racing events focus on competitive races with other drivers on point-to-point circuits or routes, checkpoint races and races PES 2016 download Miracle Box Cracked m3 data recovery crack vray crack freemake video converter crack key Crime Korean Drama primocache crack icloud remover crack planswift crack Connectify Hotspot Cracksprints or drifts (the latter absent in its predecessor), with players able to use Nitrogen oxide and Speedbreaker when needed. either to help win the race, or to get out of difficult situations that recharge over time. The game itself features four game modes: Race, Quick Race, Challenge Series and Multiplayer, the latter offering online play available on all console and PC versions of the game, except the Wii edition.

    ReplyDelete
  18. You must be known about WhatsApp mods, but most of the mods are just made for small purpose use. But FMWhatsApp is one of the best.

    ReplyDelete
  19. converter crack key Crime Korean Drama primocache crack icloud remover crack planswift crack Connectify Hotspot Cracksprints or drifts (the latter absent in its predecessor), with players able to use Nitrogen oxide and Speedbreaker when needed. either to help win the race, or to get out of difficult situations that recharge over time. The game itself features four game modes: Race, Quick Race, Challenge Series and Multiplayer, the latter offering online play available on all console and PC versions of the game, except the Wii edition.iVCam Crack Free Download Full Version
    studio one 4 license file download
    rc20 plugin free mac
    best hair straightener under 50 dollar
    cs go monitor

    ReplyDelete
  20. Users may design games and play games made by other users on the online gaming platform and game development system known as Roblox. After its debut in 2006, the game picked considerable steam but was unable to take off. In the second part of the 2010s, Roblox started to expand quickly, and the current epidemic has only helped to accelerate that growth.

    We require app icons and banners with certain sizes in order to create the Facebook application. We don't focus on designing Icons and Banners while the application is being developed. We need rudimentary banners and icons to start. You can design these Icons and Banners in under a minute if you are a Java developer. Visit http://blog.sodhanalibrary.com/2014/09/create-phonegapcordova-icons-and.html to learn more about the fundamental concept behind this app.

    gta 5 apk

    ReplyDelete

Blogroll

Popular Posts