~stephen-elson/do-plugins/iplayer

« back to all changes in this revision

Viewing changes to Iplayer/src/IplayerProgrammeItem.cs

  • Committer: Stephen Elson
  • Date: 2009-06-29 19:48:40 UTC
  • Revision ID: stephen.elson@gmail.com-20090629194840-p4h7igr47sgy1hrs
Better image quality, and slight transparency on station emblem

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
                        Colorspace colorspace = image.Colorspace;
106
106
                        int bitsPerSample = image.BitsPerSample;
107
107
                        int top_margin = (image.Width - image.Height) / 2;
 
108
                        
108
109
                        Pixbuf composite = new Pixbuf (colorspace,
109
110
                                true,
110
111
                                bitsPerSample,
115
116
                        
116
117
                        // Composite the images on the central one
117
118
                        image.Composite (composite,
118
 
                                0, top_margin, image.Width, image.Height,
119
 
                                0.0, top_margin, 1.0, 1.0,
120
 
                                InterpType.Hyper,
 
119
                                0, 
 
120
                            top_margin, 
 
121
                            image.Width, 
 
122
                            image.Height,
 
123
                                0.0, 
 
124
                            top_margin, 
 
125
                            1.0, 
 
126
                            1.0,
 
127
                                InterpType.Bilinear,
121
128
                                255);
 
129
                        
122
130
                        emblem.Composite (composite,
123
 
                                5, (image.Height - emblem.Height) + top_margin - 5, emblem.Width, emblem.Height,
124
 
                                5.0, (image.Height - emblem.Height) + top_margin - 5, 1.0, 1.0,
125
 
                                InterpType.Hyper,
126
 
                                255);
 
131
                                5, 
 
132
                            (image.Height - emblem.Height) + top_margin - 5, 
 
133
                            emblem.Width, 
 
134
                            emblem.Height,
 
135
                                5.0, 
 
136
                            (image.Height - emblem.Height) + top_margin - 5, 
 
137
                            1.0, 
 
138
                                1.0,
 
139
                                InterpType.Bilinear,
 
140
                                220);
127
141
                        
128
142
                        // Write out the image as a JPG
129
143
                        composite.Save (folder + this.pid + ".png", "png");
 
144
                        
 
145
                        Log<Iplayer>.Debug ("Saved {0}", this.pid + ".png");
130
146
                }
131
147
        }
132
148
}