@@ -189,6 +189,7 @@ impl Frame<'static> {
189
189
/// # Panics:
190
190
/// * If the length of pixels does not equal `width * height * 4`.
191
191
#[ cfg( feature = "color_quant" ) ]
192
+ #[ track_caller]
192
193
pub fn from_rgba ( width : u16 , height : u16 , pixels : & mut [ u8 ] ) -> Self {
193
194
Frame :: from_rgba_speed ( width, height, pixels, 1 )
194
195
}
@@ -208,6 +209,7 @@ impl Frame<'static> {
208
209
/// * If the length of pixels does not equal `width * height * 4`.
209
210
/// * If `speed < 1` or `speed > 30`
210
211
#[ cfg( feature = "color_quant" ) ]
212
+ #[ track_caller]
211
213
pub fn from_rgba_speed ( width : u16 , height : u16 , pixels : & mut [ u8 ] , speed : i32 ) -> Self {
212
214
assert_eq ! ( width as usize * height as usize * 4 , pixels. len( ) , "Too much or too little pixel data for the given width and height to create a GIF Frame" ) ;
213
215
assert ! ( speed >= 1 && speed <= 30 , "speed needs to be in the range [1, 30]" ) ;
@@ -263,6 +265,7 @@ impl Frame<'static> {
263
265
/// # Panics:
264
266
/// * If the length of pixels does not equal `width * height`.
265
267
/// * If the length of palette > `256 * 3`.
268
+ #[ track_caller]
266
269
pub fn from_palette_pixels ( width : u16 , height : u16 , pixels : impl Into < Vec < u8 > > , palette : impl Into < Vec < u8 > > , transparent : Option < u8 > ) -> Self {
267
270
let pixels = pixels. into ( ) ;
268
271
let palette = palette. into ( ) ;
@@ -283,6 +286,7 @@ impl Frame<'static> {
283
286
///
284
287
/// # Panics:
285
288
/// * If the length of pixels does not equal `width * height`.
289
+ #[ track_caller]
286
290
pub fn from_indexed_pixels ( width : u16 , height : u16 , pixels : impl Into < Vec < u8 > > , transparent : Option < u8 > ) -> Self {
287
291
let pixels = pixels. into ( ) ;
288
292
assert_eq ! ( width as usize * height as usize , pixels. len( ) , "Too many or too little pixels for the given width and height to create a GIF Frame" ) ;
@@ -309,6 +313,7 @@ impl Frame<'static> {
309
313
/// * If the length of pixels does not equal `width * height * 3`.
310
314
#[ cfg( feature = "color_quant" ) ]
311
315
#[ must_use]
316
+ #[ track_caller]
312
317
pub fn from_rgb ( width : u16 , height : u16 , pixels : & [ u8 ] ) -> Self {
313
318
Frame :: from_rgb_speed ( width, height, pixels, 1 )
314
319
}
@@ -329,6 +334,7 @@ impl Frame<'static> {
329
334
/// * If `speed < 1` or `speed > 30`
330
335
#[ cfg( feature = "color_quant" ) ]
331
336
#[ must_use]
337
+ #[ track_caller]
332
338
pub fn from_rgb_speed ( width : u16 , height : u16 , pixels : & [ u8 ] , speed : i32 ) -> Self {
333
339
assert_eq ! ( width as usize * height as usize * 3 , pixels. len( ) , "Too much or too little pixel data for the given width and height to create a GIF Frame" ) ;
334
340
let mut vec: Vec < u8 > = Vec :: new ( ) ;
0 commit comments