Share gif image without conversion

Hello,
I have an application (universal app) that generates gif images. And I want user to share gif image.
The problem is when I try to share by using next code:
DataTransferManager.GetForCurrentView().DataRequested += (DataTransferManager mgr, DataRequestedEventArgs ar) =>
//dataPackage.SetHtmlFormat(HtmlFormatHelper.CreateHtmlFormat(
ar.Request.Data.Properties.Title = (string)DefaultViewModel["title"];
ar.Request.Data.Properties.Description = (string)DefaultViewModel["description"];
ar.Request.Data.Properties.FileTypes.Add(".gif");
List<IStorageItem> l = new List<IStorageItem>();
l.Add(file);
ar.Request.Data.SetStorageItems(l, true);
DataTransferManager.ShowShareUI();
The gif image is converted to jpg.
Is there any way to avoid conversion?
Thank you
no where man
http://www.nowhereman.eu

Exactly how is it converted to .jpg? Do you mean the file format has changed? If you can, please upload a project to OneDrive that shows this problem.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces.

Similar Messages

  • RESIZING GIF IMAGES WITHOUT LOSING ANIMATION

    Is it possible to resize a Gif image without losing animation?  I tried but unfortunately lost the animation. I use CS3 Extended.  Thanks

    No, I don't think so. for that, you'd probably have to import your animation using the Video to Layers option, resize, then rebuild the animation and export it.
    Mylenium

  • Digital watermarking gif images

    I ve writed a program which watermarks png and non-animated gif images .But there is a problem because we started to use animated gif images. How can we watermark animated gif images without corrupting animation of the image?
    Regards
    Murat

    I haven't done much with gif animation, but here's an example that extracts the series of BufferedImages
    from a gif file. Good luck!
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import java.net.URL;
    import java.util.*;
    import javax.imageio.*;
    import javax.imageio.metadata.*;
    import javax.imageio.stream.*;
    import javax.swing.*;
    import org.w3c.dom.*;
    public class ViewGif extends JPanel {
        private BufferedImage[] images;
        private Point[] offsets;
        private BufferedImage composite;
        public static void main(String[] args) throws IOException {
            JPanel app = new ViewGif();
            app.setBackground(Color.RED);
            JFrame frame = new JFrame("ViewGif");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new JScrollPane(app));
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public ViewGif() throws IOException {
            URL url = new URL("http://members.aol.com/royalef/sunglass.gif");
            Iterator readers = ImageIO.getImageReadersBySuffix("gif");
            if (!readers.hasNext())
                throw new IOException("no gif readers");
            ImageReader reader = (ImageReader) readers.next();
            if (readers.hasNext())
                System.out.println("(there were oither readers)");
            ImageInputStream iis = ImageIO.createImageInputStream(url.openStream());
            reader.setInput(iis);
            final int numImages = reader.getNumImages(true);
            images = new BufferedImage[numImages];
            offsets = new Point[numImages];
            for(int i=0; i<numImages; ++i) {
                images[i] =  reader.read(i);
                offsets[i] = getPixelOffsets(reader, i);
            composite = new BufferedImage(images[0].getWidth(), images[0].getHeight(),
                BufferedImage.TYPE_INT_ARGB);
            final Graphics2D g2 = composite.createGraphics();
            g2.drawImage(images[0], offsets[0].x, offsets[0].y, null);
            new javax.swing.Timer(100, new ActionListener(){
                int j = 1;
                public void actionPerformed(ActionEvent evt) {
                    g2.drawImage(images[j], offsets[j].x, offsets[j].y, null);
                    j = (j+1) % numImages;
                    repaint();
            }).start();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Insets insets = getInsets();
            g.drawImage(composite, insets.left, insets.top, null);
        public Dimension getPreferredSize() {
            Insets insets = getInsets();
            int w = insets.left + insets.right + composite.getWidth();
            int h = insets.top + insets.bottom + composite.getHeight();
            return new Dimension(w,h);
        static Point getPixelOffsets(ImageReader reader, int num) throws IOException {
            IIOMetadata meta = reader.getImageMetadata(num);
            Point point = new Point(-1,-1);
            Node root = meta.getAsTree("javax_imageio_1.0");
            for (Node c = root.getFirstChild(); c != null; c = c.getNextSibling()) {
                String name = c.getNodeName();
                if ("Dimension".equals(name)) {
                    for (c = c.getFirstChild(); c != null; c = c.getNextSibling()) {
                        name = c.getNodeName();
                        if ("HorizontalPixelOffset".equals(name))
                            point.x = getValueAttribute(c);
                        else if ("VerticalPixelOffset".equals(name))
                            point.y = getValueAttribute(c);
                    return point;
            return point;
        static int getValueAttribute(Node node) {
            try {
                return Integer.parseInt(node.getAttributes().getNamedItem("value").getNodeValue());
            } catch (NumberFormatException e) {
                return -2;

  • Photoshop CS4 Gif Image

    Sir,
    i am using photosop cs4. and making a gif image of width & height of (928x82). but when i am exporting it to gif image, it's quality get reduced. Is there any way to keep the quality of gif image intact after exporting. please do the needfull ASAP.

    Sir, i have tried an animated gif with background color and another animated gif without background color.
    Gif with background color keeps text resolution safe. But Gif without background color disturbs the text resolution. why is it so?  bcz i want an animated transparent gif.

  • If I try and follow a link from another website to open another I get awclick.php (GIF Image 1x1) pixels in a new tab instead of the web page I want.

    I was trying to open a website as a link from another website and I get a new tab that says
    awclick.php(GIF Image 1x1 pixels)
    I can open the website without clicking on a link to it by just typing in the address but as this is a cash back site I am linking from it doesn't help!

    You're welcome

  • Using GIF images in iMovie11 ??

    Admittedly this is now my first attempt at using the iMovie8/9/11 editing structure since I was perfectly satisfied with iMovie06 HD and that timeline approach. In the old program I had GIF formatted images (Maps) that I had available in my "Photos" Media for adding to my Project timeline in the same fashion I would use a still JPG photo.
    After a number of hours searching the forum here and all the iMovie 9/11 documentation I can find, it appears  this new version of iMovie does not display GIF images in your iPhoto Media list to use for projects. Bottomline is I am not able to drag a gif map into my video project. It seems only JPG format files are now displayed in iMovie's iPHOTO Media source list.  I have one graphic that is a collage of photos and graphical objects which I had saved in JPG format to preserve the photo quality and that one shows in my Media list. No GIFs.  What gives?  I can open iPhoto stand alone and see my map graphics that are present in the database in their own Rolls.  I've tried dragging, dropping, importing, etc. with no success.
    This is a significant limitation (or bug) if the current version of iMovie does not allow free use of graphical images in GIF format. Can anyone shed some light on this and help solve my problem before I go back to iMovie HD?  Thanks in advance.

    Klondike Kid wrote:
    Hmm, doesn't seem to make sense …
    I'm not in the position here to 'defend' Apples decision, but an expert as you should keep in mind:
    iM vers.≤6 was a completely diff app than iM vers. ≥08
    same name, from the ground different programs (not only on the outside)
    video isn't based upon limited 256 colors, nor has inserting a file-size-degraded still any effect on the resulting video-file size.
    Photoshop is a >1k$ professional tool, meant for stills - so, it should support a bunch of formats, including obsolete ones. iMovie is a 15$ consumer toy tool, by concept reduced in options to offer convenience - for a broad range of people - I dare to say, the majority of iMovie users dont even know the existence of 'gif', iMovies iLife partner for stills, iPhoto, is biased to jpg.-
    Klondike Kid wrote:
    … I guess I'll have to live without it for iMovie.
    on MacOS, there's little options, I haven't tried, but I wouldn't be surprised, if FCPX doesn't support gif either. pretty sure, Premiere as part of the Adobe CS suite, will handle it - somehow.
    happy movie making!

  • Adding a gif image

    At the moment I have just drawn checkers but I would like to add a .gif image so it looks alot better. But im really unsure how to do this without completely messing things up. Thanks to any help guys
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyDraughts1edited extends Applet
                             implements MouseListener, MouseMotionListener{
      private int top = 0, left1 = 0, bWidth = 200, n = 4;
      private Point counter1, counter2, counter3, counter4, counter5, counter6,
       counter7, counter8, mouse;
      private int select;
      public void init() {
        this.addMouseMotionListener(this);
        this.addMouseListener(this);
        counter1 = new Point(15,15);
        counter2 = new Point(65,15);
        counter3 = new Point(115,15);
        counter4 = new Point(165,15);
        counter5 = new Point(15,165);
        counter6 = new Point(65,165);
        counter7 = new Point(115,165);
        counter8 = new Point(165,165);
      public void paint (Graphics g) {
        Draw_Board(g);
        g.setColor (Color.black);
        g.fillOval(counter1.x, counter1.y, 20,20);
        g.fillOval(counter2.x, counter2.y, 20,20);
        g.fillOval(counter3.x, counter3.y, 20,20);
        g.fillOval(counter4.x, counter4.y, 20,20);
        g.setColor (Color.white);
        g.fillOval(counter5.x, counter5.y, 20,20);
        g.fillOval(counter6.x, counter6.y, 20,20);
        g.fillOval(counter7.x, counter7.y, 20,20);
        g.fillOval(counter8.x, counter8.y, 20,20);
      public void mouseDragged(MouseEvent e) {
        mouse = e.getPoint();
        // continuously change the coordinates of the selected counter
        switch(select){
          case 1 : counter1 = mouse; break;
          case 2 : counter2 = mouse; break;
          case 3 : counter3 = mouse; break;
          case 4 : counter4 = mouse; break;
          case 5 : counter5 = mouse; break;
          case 6 : counter6 = mouse; break;
          case 7 : counter7 = mouse; break;
          case 8 : counter8 = mouse; break;
          default :
        repaint();
      // required for the interface
      public void mouseMoved(MouseEvent e) {}
      public void mousePressed(MouseEvent e) {
        mouse = e.getPoint();
        if (mouse.x > counter1.x - 20 && mouse.x < counter1.x + 20 &&
            mouse.y > counter1.y - 20 && mouse.y < counter1.y + 20){
          select = 1;
        else if (mouse.x > counter2.x - 20 && mouse.x < counter2.x + 20 &&
            mouse.y > counter2.y - 20 && mouse.y < counter2.y + 20){
          select = 2;
        else if (mouse.x > counter3.x - 20 && mouse.x < counter3.x + 20 &&
            mouse.y > counter3.y - 20 && mouse.y < counter3.y + 20){
          select = 3;
        else if (mouse.x > counter4.x - 20 && mouse.x < counter4.x + 20 &&
            mouse.y > counter4.y - 20 && mouse.y < counter4.y + 20){
          select = 4;
        else if (mouse.x > counter5.x - 20 && mouse.x < counter5.x + 20 &&
            mouse.y > counter5.y - 20 && mouse.y < counter5.y + 20){
          select = 5;
        else if (mouse.x > counter6.x - 20 && mouse.x < counter6.x + 20 &&
            mouse.y > counter6.y - 20 && mouse.y < counter6.y + 20){
          select = 6;
        else if (mouse.x > counter7.x - 20 && mouse.x < counter7.x + 20 &&
            mouse.y > counter7.y - 20 && mouse.y < counter7.y + 20){
          select = 7;
        else if (mouse.x > counter8.x - 20 && mouse.x < counter8.x + 20 &&
            mouse.y > counter8.y - 20 && mouse.y < counter8.y + 20){
          select = 8;
        else{
        repaint();
      // required for the interface
      public void mouseClicked(MouseEvent event){}
      public void mouseReleased(MouseEvent event){}
      public void mouseEntered(MouseEvent event){}
      public void mouseExited(MouseEvent event){}
      private void Draw_Board(Graphics g) {
        int sqWidth = bWidth/n; // Rounds down
        for (int row = 0; row < 4; ++row){
          for(int Col=0; Col<4; Col++) {
            g.setColor(posColor(row, Col));
            g.fillRect
             (left1 + Col * sqWidth, top + row * sqWidth, sqWidth, sqWidth);
      private boolean isEven(int x) {
        return(x == 2 * (x / 2));
      private Color posColor(int row, int Col) {
        if ( (isEven(row) && isEven(Col)) ||
            (! isEven(row) && ! isEven(Col))){
          return(Color.GRAY);
        else{
          return(Color.lightGray);
    }

    If you can use Swing instead of AWT, then maybe this posting will give you some ideas:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=518707&start=3

  • ITunes converts all my GIF images to JPG when I sync my iPhone.

    I have an iPhone and a Mac, and on my iPhone I have noticed that whenever I preview my images, GIF images won't play. They will just sit there, and I can only see one frame of them. I have to send the GIFs to myself through text to see them play, but they are GIF files on my iPhone. But, the recent images that I have downloaded from my iTunes to my iPhone do not show up as GIFs, they show up as JPGs instead. Everytime I sync my photos, the GIFs just randomly get converted into JPG images on my iPhone, and I'm not sure how to stop it from doing that. I don't know any other way to move my images from my Mac onto my iPhone without going through iTunes to do so. Is there a way I can get it to stop converting them to JPGs, or is there another way to put photos from my Mac to my iPhone? Thanks!

    I have an iPhone and a Mac, and on my iPhone I have noticed that whenever I preview my images, GIF images won't play. They will just sit there, and I can only see one frame of them. I have to send the GIFs to myself through text to see them play, but they are GIF files on my iPhone. But, the recent images that I have downloaded from my iTunes to my iPhone do not show up as GIFs, they show up as JPGs instead. Everytime I sync my photos, the GIFs just randomly get converted into JPG images on my iPhone, and I'm not sure how to stop it from doing that. I don't know any other way to move my images from my Mac onto my iPhone without going through iTunes to do so. Is there a way I can get it to stop converting them to JPGs, or is there another way to put photos from my Mac to my iPhone? Thanks!

  • Converted GIF Images Does Not Display In Report

    I have a wmf file that contains an image. I converted the wmf file into a gif using software A. This image displays correctly in Oracle Forms and Reports (9.0.4). I take the same wmf file and use software B to convert the file into a gif. Using the same form and report, the gif image displays in Oracle Forms but doesn't display in Oracle Reports. I don't see why a gif image coverted from software A works properly but not when converted from software B. They are both gif images as a result of the conversion from the same wmf source file.
    The reason I prefer software B is because it's a command line executable and the output is close to the original wmf file. When using the command line executabe from software A to convert the wmf file, the resulting gif file is 1/4 the original size and blocky when resized to the original wmf dimensions.
    Is this an Oracle Reports issue/setting or the converter I'm using?

    Thanks Clare!
    Yes I run IE as Administrator. please find screen shots.
    Also, SQL Server is running in SQL server and windows authentication mode. and when i connect data source in BIDS with windows authentication, test shows success but with another login id ReportServerLogin it does not connect. ReportServerLogin login has
    all rights given and is there as sysadmin.
    please find the screen shots.
    Adnan

  • EPub Scanned Images without Text Flow

    I am working on an ebook that has lots of complex illustrations, tables, captions. Scanning the images by converting them to JPEG is needed in order for the illlustrations and text to not move. Text flow is an option that I will not be able to offer.
    How do I create an ePub book with scanned images without text flow. I did it once, but cannot remember how to do it.

    TabulaMentis wrote:
    The ePub version of the ebook will have a fixed layout without text flow. You mentioned that I buy someone's book, but this is a simple question. Why does InDesign not make it easy to convert an InDesign CS5.5 file into an ePub file with fixed images without text flow. Amazon and Google have lots of those types of ebooks in ePub format for sale with fixed images without text flow?
    Because if you read anything about creating EPUB files, you'll find that that's NOT how they're intended to be used.
    For example, in the first paragraph of the Wikipedia article about EPUB, you'll read:
    "EPUB is designed for reflowable content, meaning that the text display can be optimized for the particular display device used by the reader of the EPUB-formatted book. The format is meant to function as a single format that publishers and conversion houses can use in-house, as well as for distribution and sale."
    So that's why InDesign exports EPUB the way it does.

  • Saving a image without a background

    I did the tutorial on Removing Image Backgrounds with
    Fireworks. That works great, but I don't know how to save a image
    without a background. I am trying to save it for a website. I have
    Fireworks 8.0. I tried to save it as a Alpha Transparency GIF file
    , but the image is poor. I don't know the correct way of saving
    this.
    Any help would be greatly appreciated.
    Tony

    On Tue, 16 May 2006 20:48:12 +0400, Tony024
    <[email protected]>
    wrote:
    > Ilya Razmanov,
    >
    > I did have that problem viewing under IE 6 on one of my
    pc. My other
    > pc is
    > running IE 7 and it is fine. I am trying to save the
    image without any
    > bacakground so I can upload it to dreamweaver 8.0 so
    that it can be
    > viewed in
    > any IE. I am trying to use a GIF or a JPEG file.
    Official JPEG specs does not allow any transparency at all,
    so save your
    time and quit trying it. GIF only support limited colors (up
    to 256), one
    of that can be assigned as "transparent". So when FW exports
    GIF from a
    source file that have any partial transparency, it "premixes"
    any partial
    transparent color of source with "matte" color. In case the
    latter
    correspond to average color of your page background, and your
    page
    background is not too wild and colorful, and you are not
    using too wide
    partially transparent stuff, it normally work well.
    Among the image formats common on the Web, only PNG provides
    true partial
    transparency. Alas, IE still does not correctly understand
    that part of
    PNG specs that was set years ago. So if you definitely
    positevely can't
    live without transparency things that are available in GIFs,
    PNG plus
    specific CSS and\or Javascript trics is the only way to go.
    However, I'd
    personally make sure I can't live with old limited GIFs
    before going that
    way.
    Ilya Razmanov
    http://photoshop.msk.ru -
    Photoshop plug-in filters

  • Customizing Look and Feel (CLAF) - gif images/tabs disappear.Urgent!!!!

    Hi,
    I am trying to change the font colors in irec through CLAF responsiblity. But a strange thing is happening. Though the color is reflecting, the gif images are missing (logout, personalize etc) and the link text below it are appearing like breadcrumbs. Also , the tabs are completely removed and the tab labels are appearing like breadcrumbs. My CLAF is based on base-desktop.
    I also tried to create a new CLAF without any change in colors and saved it and attached to the profile and bounced the apache. But the gif and tabs are missing.
    Could someone tell me why is this happening. It is very urgent.
    Regards

    Hi:
    The DBA's did the following as I have mentioned below:
    Clear the image cache - /OA_HTML/cabo/images/cache
    Clear the cache - /OA_HTML/cabo/styles/cache
    Bounce the apache.
    Restart the server - X.11 display server
    These are the permissions for the directories:
    /home/apps/ora_fin/IHR25D/common/html/cabo/images - drwxr-xr-x
    /home/apps/ora_fin/IHR25D/common/html/cabo/images/cache - drwxr-xr-x
    /home/apps/ora_fin/IHR25D/common/html/cabo/styles - drwxrwxr-x
    /home/apps/ora_fin/IHR25D/common/html/cabo/styles/cache - drwxr-xr-x
    But still I am not seeing any gif images or tabs.
    Regards
    Sun

  • Resaving a gif image

    Can anyone tell me if there is much image quality loss when
    resaving a gif image. I have not seen much loss, but would like to
    know for sure.
    Thanks.

    On Thu, 19 Apr 2007 00:04:16 +0400, shoretel
    <[email protected]> wrote:
    > Can anyone tell me if there is much image quality loss
    when resaving a
    > gif image. I have not seen much loss, but would like to
    know for sure.
    It may happen if you either reduce the number of colors, or
    force FW to
    apply different palette. If you use "Exact" palette (guess
    you noticed
    that option in export settings), nothing is changed. Well,
    actually
    there's no reason to resave then, since nothing is changed -
    you may
    simply copy your file without starting FW :-)
    Ilya Razmanov
    http://photoshop.msk.ru -
    Photoshop plug-in filters

  • Embedding GIF image

    Hello!
    Is there any convenient way to embed GIF image into flash
    file? Embedding JPG image was easy using HTML <img> tag, but
    that does not seem to work with GIF.
    The reason I need this, so the argument ?image could be
    passed to flash file and the image inside flash would switch
    according to the passed argument (without editing .FLA file
    itself).
    Thank you in advance!

    ok - the real problem here is that you are using the 'actual'
    file as it loads to act as the preloader - in this case the
    majority of the file will load previous to the preloader initiating
    anything because it will not function until the file is
    instantiated. a much better way of handling this is to use the
    MovieClipLoader class and create a 'loading' swf file that IS the
    preloader, which in turn 'loads' the actual swf. you then use the
    onLoadProgress handler of the MCL class to control the events of
    the load and then you can initiate the opening methods in the load
    file using the onLoadInit handler.
    so you would make a file that is the same size as the main
    file, then place your preloader assets and code constructs for the
    options you're using within that file - call mcl.loadClip() and
    load the 'main' swf in that way. the preloader should then only be
    a few k at the most and load almost instantly, and show the
    progress properly. this is the best way to go when dealing with
    large files.

  • Transparency gif image for icon

    Hi all,
    I am trying to do some art work with Microsoft paint. I am trying to draw an icon(a gif image).
    Microsoft paint? Is there any other tool that I can use?
    I have problem with the transparancy color. It keep showing up even I set the color to be RGB(153,153,153) Any idea guys?
    Thanks

    In my experience, if there is a GIF image that already contains transparent pixels, you can show it using "ImageIcon.class" directly without the need to set any RGB color yourself.

Maybe you are looking for

  • No receiver could be determined error in AAE - File Adapter

    Dear Friends, We have PI 7.1, EHP1. We are doing migration of our existing configuration scenarios into AAE. While do testing the interfaces after migration, we face one issue.  In a File to SOAP scenario (Async), once the file is polled from the sou

  • Full Screen viewing of images in Bridge CS3

    I have Bridge CS3 on my macbook pro that I generally use when I'm on the road.  Up until last week, I would use the space bar to view images in full screen mode.  Now, mysteriously, pressing the space bar does nothing and I can't for the life of me f

  • Installing development tools like gcc

    hello everybody, i'm a linux user. i installed solaris 10 using the dvd (i need real time for threads). 1- i was surprised, it's the first time that my lan card r8169 gigabit wad not reconized. how can i intall it ? 2- how can i install gcc without d

  • Compiling dbxml-2.5.16 on Mac OSX

    When I compile without options everything runs fine to the end. If I compile with option --enable-java I get: ../dist/../libdb_java/db_java_wrap.c:137:17: error: jni.h: No such file or directory ../dist/../libdb_java/db_java_wrap.c:161: error: expect

  • 5417 Dynamic Authorization failed

    Hi guys, Does anyone meet this Radius Error in Cisco ISE 1.2 and the switch 2960 12.2(55)SE7 ? When i reauthentication the guest profile to the other profile using Radius CoA on the Self-Service Guest Workflow. The error is : Event 5417 Dynamic Autho